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:
chrox
2013-12-20 12:05:07 +08:00
parent 648b4f33ec
commit e5bf0eb13e
3 changed files with 8 additions and 6 deletions

View File

@@ -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,