[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:
hius07
2021-04-04 18:27:17 +03:00
committed by GitHub
parent 10922561dd
commit aef1e271b5
5 changed files with 26 additions and 39 deletions

View File

@@ -52,6 +52,7 @@ function ReaderWikipedia:lookupInput()
text = _("Search Wikipedia"),
is_enter_default = true,
callback = function()
if self.input_dialog:getInputText() == "" then return end
UIManager:close(self.input_dialog)
-- Trust that input text does not need any cleaning (allows querying for "-suffix")
self:onLookupWikipedia(self.input_dialog:getInputText(), true)