mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix selection in dictionary window (#2126)
Fix #2126 (hold on a word on the 2nd page of a definition was triggering lookup of the word at the same place in 1st page).
This commit is contained in:
@@ -292,7 +292,7 @@ function TextBoxWidget:onHoldWord(callback, ges)
|
||||
if not callback then return end
|
||||
|
||||
local x, y = ges.pos.x - self.dimen.x, ges.pos.y - self.dimen.y
|
||||
local line_num = math.ceil(y / self.line_height_px)
|
||||
local line_num = math.ceil(y / self.line_height_px) + self.virtual_line_num-1
|
||||
local line = self.vertical_string_list[line_num]
|
||||
DEBUG("holding on line", line)
|
||||
if line then
|
||||
|
||||
Reference in New Issue
Block a user