diff --git a/src/pyj/read_book/create_annotation.pyj b/src/pyj/read_book/create_annotation.pyj index 2889aec60f..e212e209cf 100644 --- a/src/pyj/read_book/create_annotation.pyj +++ b/src/pyj/read_book/create_annotation.pyj @@ -639,12 +639,14 @@ class CreateAnnotation: c = self.container c.style.display = 'flex' c.focus() + self.view.selection_bar.hide() def hide(self): if self.is_visible: self.container.style.display = 'none' self.view.focus_iframe() self.send_message('set-highlight-style', style=None) + self.view.selection_bar.update_position() def send_message(self, type, **kw): self.view.iframe_wrapper.send_message('annotations', type=type, **kw) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 7b22e642d1..15a2107c25 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -420,6 +420,10 @@ class View: self.iframe_wrapper.send_message('overlay_visibility_changed', visible=visible) if ui_operations.overlay_visibility_changed: ui_operations.overlay_visibility_changed(visible) + if visible: + self.selection_bar.hide() + else: + self.selection_bar.update_position() def on_handle_shortcut(self, data): if data.name is 'back':