diff --git a/frontend/apps/reader/modules/readerhighlight.lua b/frontend/apps/reader/modules/readerhighlight.lua index 2be9a9913..64962ce5d 100644 --- a/frontend/apps/reader/modules/readerhighlight.lua +++ b/frontend/apps/reader/modules/readerhighlight.lua @@ -1810,12 +1810,14 @@ function ReaderHighlight:onHold(arg, ges) end return true end - -- It has happened it failed because the text range was detected on the - -- previous page and highlighted by crengine, but no word was returned - -- (because the boxes were not on the current page). - -- Be sure we clear any such selection - self.ui.document:clearSelection() - -- And that we don't get stuck in a hold state + if self.ui.rolling then + -- It has happened it failed because the text range was detected on the + -- previous page and highlighted by crengine, but no word was returned + -- (because the boxes were not on the current page). + -- Be sure we clear any such selection + self.ui.document:clearSelection() + end + -- Be sure we don't get stuck in a hold state self.hold_pos = nil return false end