From dd3810f6f42a709bb802f99a85b37d8a067a66b6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Aug 2020 23:26:01 +0530 Subject: [PATCH] Cancel button on edit notes now works --- src/pyj/read_book/selection_bar.pyj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyj/read_book/selection_bar.pyj b/src/pyj/read_book/selection_bar.pyj index 096fc04237..a7d7bf0bc5 100644 --- a/src/pyj/read_book/selection_bar.pyj +++ b/src/pyj/read_book/selection_bar.pyj @@ -644,8 +644,12 @@ class SelectionBar: ed.style.left = x + 'px' ed.style.top = y + 'px' - def hide_editor(self, apply): - pass # TODO: Implement this + def hide_editor(self, apply_changes): + if not apply_changes: + self.state = WAITING + self.update_position() + return + # TODO: Implement this def editor_container_clicked(self, ev): ev.stopPropagation(), ev.preventDefault()