fix closing dict window will bookmark current page
use `self.highlight:handleEvent(Event:new("Tap"))` instead of
`self.ui:handleEvent(Event:new("Tap"))` when clearing highlighted
text since Tap event in latter situation will be captured by
the dogear widget.
This commit is contained in:
1 parent
648b4f33ec
commit
e5bf0eb13e
3 files changed
+8
-6
No files matched your search
@@ -7,7 +7,8 @@ local DEBUG = require("dbg")
|
||||
|
||||
local ReaderDictionary = EventListener:new{}
|
||||
|
||||
function ReaderDictionary:onLookupWord(word)
|
||||
function ReaderDictionary:onLookupWord(highlight, word)
|
||||
self.highlight = highlight
|
||||
self:stardictLookup(word)
|
||||
end
|
||||
|
||||
@@ -36,6 +37,7 @@ function ReaderDictionary:showDict(results)
|
||||
DEBUG("showing quick lookup dictionary window")
|
||||
UIManager:show(DictQuickLookup:new{
|
||||
ui = self.ui,
|
||||
highlight = self.highlight,
|
||||
dialog = self.dialog,
|
||||
results = results,
|
||||
dictionary = self.default_dictionary,
|
||||
|
||||
Reference in new issue
Block a user