mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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