Fix #1925961 [Scrolling within annotation window doesn't work properly](https://bugs.launchpad.net/calibre/+bug/1925961)

This commit is contained in:
Kovid Goyal 2021-04-24 08:10:56 +05:30
parent b8d8cf27e2
commit c5fbd12b64
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -279,6 +279,7 @@ class SelectionBar:
editor_div = E.div(id=self.editor_id, style='position: absolute')
container.appendChild(editor_div)
editor_div.addEventListener('click', self.editor_container_clicked, {'passive': False})
editor_div.addEventListener('wheel', def(ev):ev.stopPropagation();, {'passive': True})
# bar and handles markup {{{
@ -295,7 +296,7 @@ class SelectionBar:
bar_container.style.maxWidth = 'min(50rem, 90vw)' if self.supports_css_min_max else '50rem'
bar_container.style.backgroundColor = get_color("window-background")
notes_container = E.div()
notes_container.addEventListener('wheel', def(evt): evt.stopPropagation();, {'passive': True})
notes_container.addEventListener('wheel', def(evt): evt.stopPropagation();, {'passive': False})
for x in [
E.div(style='height: 4ex; display: flex; align-items: center; padding: 5px; justify-content: center'),