mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Read aloud: Fix clicking on empty spaces causing read aloud to restart from beginning of chapter. Fixes #2042791 [ebook-viewer read aloud click no text area return to first page](https://bugs.launchpad.net/calibre/+bug/2042791)
This commit is contained in:
parent
64289d3260
commit
378e21b907
@ -988,6 +988,8 @@ class IframeBoss:
|
|||||||
text_node, offset = None, 0
|
text_node, offset = None, 0
|
||||||
if data.pos:
|
if data.pos:
|
||||||
r = word_at_point(data.pos.x, data.pos.y)
|
r = word_at_point(data.pos.x, data.pos.y)
|
||||||
|
if not r:
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
r = first_visible_word()
|
r = first_visible_word()
|
||||||
if r and r.startContainer?.nodeType is Node.TEXT_NODE:
|
if r and r.startContainer?.nodeType is Node.TEXT_NODE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user