Content server: Fix long tapping in the notes edit area incorrectly changing the highlight extent. Fixes #1983271 [[Content Server] Note window pops up but text still selectable underneath](https://bugs.launchpad.net/calibre/+bug/1983271)

This commit is contained in:
Kovid Goyal 2022-08-08 11:16:01 +05:30
parent 31b2466ea6
commit 3796f82a00
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -353,11 +353,15 @@ class EditNotesAndColors: # {{{
True
)
apply_button.style.marginLeft = apply_button.style.marginTop = 'auto'
stop_propagation = def(ev):
ev.stopPropagation()
c = E.div(
style=f'background: {get_color("window-background")}; margin: auto; text-align: center; padding: 1ex;',
onclick=def(ev): ev.stopPropagation();,
onclick=stop_propagation,
id=unique_id(), E.div(
ontouchstart=stop_propagation, ontouchmove=stop_propagation, ontouchend=stop_propagation, ontouchcancel=stop_propagation,
oncontextmenu=stop_propagation,
E.textarea(
placeholder=_('Add notes for this highlight. Double click or long tap on a highlight to read its notes.'),
rows='10', spellcheck='true', style='width: 90%;',