mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ButtonTable: reset MovableContainer state on button tap
Prevent any later hold_release event from being handled by MovableContainer as a moving touch+hold_release. This issue was noticable when closing DictQuickLookup with long-press on close, resulting in the movable highlight actions ButtonTable moving to where the long-press happened.
This commit is contained in:
@@ -342,4 +342,11 @@ function MovableContainer:onMovablePanRelease(_, ges)
|
||||
return false
|
||||
end
|
||||
|
||||
function MovableContainer:resetEventState()
|
||||
-- Cancel some internal moving-or-about-to-move state.
|
||||
-- Can be called explicitely to prevent bad widget interactions.
|
||||
self._touch_pre_pan_was_inside = false
|
||||
self._moving = false
|
||||
end
|
||||
|
||||
return MovableContainer
|
||||
|
||||
Reference in New Issue
Block a user