From 08ce7e2563ac364562d487b5c8dcb036a130d7ce Mon Sep 17 00:00:00 2001 From: rxi Date: Wed, 20 May 2020 09:24:06 +0100 Subject: [PATCH] Fixed stuck mouse-drag-selection on dropped-file Resolves #109 --- data/core/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/core/init.lua b/data/core/init.lua index c6b5732..23a8319 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -320,7 +320,8 @@ function core.on_event(type, ...) local mx, my = core.root_view.mouse.x, core.root_view.mouse.y local ok, doc = core.try(core.open_doc, select(1, ...)) if ok then - core.root_view:on_mouse_pressed("left", mx, my, 1) + local node = core.root_view.root_node:get_child_overlapping_point(mx, my) + node:set_active_view(node.active_view) core.root_view:open_doc(doc) end elseif type == "quit" then