mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix hold duration in text/html box widgets
Fix very-long-press in DictQuickLookup that should allow
doing the query to the other domain (dict/wiki) instead
of the current one.
Similar to 7dea979.
This commit is contained in:
@@ -24,6 +24,7 @@ local RenderText = require("ui/rendertext")
|
||||
local RightContainer = require("ui/widget/container/rightcontainer")
|
||||
local Size = require("ui/size")
|
||||
local TextWidget = require("ui/widget/textwidget")
|
||||
local TimeVal = require("ui/timeval")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local Math = require("optmath")
|
||||
local logger = require("logger")
|
||||
@@ -1858,7 +1859,7 @@ function TextBoxWidget:onHoldReleaseText(callback, ges)
|
||||
return false
|
||||
end
|
||||
|
||||
local hold_duration = UIManager:getTime() - self.hold_start_tv
|
||||
local hold_duration = TimeVal.now() - self.hold_start_tv
|
||||
|
||||
-- If page contains an image, check if Hold is on this image and deal
|
||||
-- with it directly
|
||||
|
||||
Reference in New Issue
Block a user