diff --git a/src/pyj/read_book/create_annotation.pyj b/src/pyj/read_book/create_annotation.pyj index e480f16bd8..5ba0ee7991 100644 --- a/src/pyj/read_book/create_annotation.pyj +++ b/src/pyj/read_book/create_annotation.pyj @@ -19,7 +19,6 @@ from widgets import create_button # TODO: # Custom colors for highlights # Export all annots as plain text/JSON -# Fix selection bar remaining open after removing highlight class AnnotationsManager: diff --git a/src/pyj/read_book/iframe.pyj b/src/pyj/read_book/iframe.pyj index d5bc48d99a..8b53287f80 100644 --- a/src/pyj/read_book/iframe.pyj +++ b/src/pyj/read_book/iframe.pyj @@ -769,6 +769,9 @@ 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() elif data.type is 'apply-highlight': sel = window.getSelection() text = sel.toString()