mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 10:54:53 +02:00
Clear selection after removing highlight
This commit is contained in:
parent
a6dd65bea4
commit
709a9658a9
2 changed files with 3 additions and 1 deletions
|
|
@ -19,7 +19,6 @@
|
|||
# TODO:
|
||||
# Custom colors for highlights
|
||||
# Export all annots as plain text/JSON
|
||||
# Fix selection bar remaining open after removing highlight
|
||||
|
||||
|
||||
class AnnotationsManager:
|
||||
|
|
|
|||
|
|
@ -769,6 +769,9 @@ def annotations_msg_received(self, data):
|
|||
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()
|
||||
elif data.type is 'apply-highlight':
|
||||
sel = window.getSelection()
|
||||
text = sel.toString()
|
||||
|
|
|
|||
Loading…
Reference in a new issue