mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Search dialogs: don't close when searching with nothing entered (#7501)
File search, Fulltext search, Search dictionary, Search Wikipedia, DictQuickLookup: do nothing when nothing entered and search is pressed.
This commit is contained in:
@@ -50,6 +50,7 @@ function ReaderSearch:onShowFulltextSearchInput()
|
||||
{
|
||||
text = backward_text,
|
||||
callback = function()
|
||||
if self.input_dialog:getInputText() == "" then return end
|
||||
UIManager:close(self.input_dialog)
|
||||
self:onShowSearchDialog(self.input_dialog:getInputText(), 1)
|
||||
end,
|
||||
@@ -58,6 +59,7 @@ function ReaderSearch:onShowFulltextSearchInput()
|
||||
text = forward_text,
|
||||
is_enter_default = true,
|
||||
callback = function()
|
||||
if self.input_dialog:getInputText() == "" then return end
|
||||
UIManager:close(self.input_dialog)
|
||||
self:onShowSearchDialog(self.input_dialog:getInputText(), 0)
|
||||
end,
|
||||
@@ -212,7 +214,6 @@ end
|
||||
|
||||
function ReaderSearch:search(pattern, origin)
|
||||
logger.dbg("search pattern", pattern)
|
||||
if pattern == nil or pattern == '' then return end
|
||||
local direction = self.direction
|
||||
local case = self.case_insensitive
|
||||
local page = self.view.state.page
|
||||
|
||||
Reference in New Issue
Block a user