only eat input when a search widget is visible

develop
Myk Taylor 2023-11-22 18:28:19 -08:00
parent 7fedff6111
commit 8faefc50d8
No known key found for this signature in database
1 changed files with 4 additions and 3 deletions

@ -110,12 +110,13 @@ local function is_mouse_key(keys)
end
function SortOverlay:onInput(keys)
if keys._MOUSE_R and self.subviews.search.focus and self:get_key() then
local key = self:get_key()
if keys._MOUSE_R and self.subviews.search.focus and key then
self.subviews.search:setFocus(false)
return true
end
return SortOverlay.super.onInput(self, keys) or
(self.subviews.search.focus and not is_mouse_key(keys))
return key and (SortOverlay.super.onInput(self, keys) or
(self.subviews.search.focus and not is_mouse_key(keys)))
end
function SortOverlay:do_search(text, force_full_search)