This commit is contained in:
Kovid Goyal 2020-07-25 22:20:03 +05:30
parent 87ca655075
commit c99f18eb62
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -769,9 +769,11 @@ class IframeBoss:
if crw_:
unwrap_crw(crw_)
v'delete annot_id_uuid_map[crw_]'
# have to remove selection otherwise it remains as the empty
# string, and the selection bar does not hide itself
window.getSelection().removeAllRanges()
sel = window.getSelection()
if not sel.toString():
# have to remove selection otherwise it remains as the empty
# string, and the selection bar does not hide itself
sel.removeAllRanges()
elif data.type is 'apply-highlight':
sel = window.getSelection()
text = sel.toString()