chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a772238
)
script: Fix event propagation (for Chromium)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2022 00:46:07 +0000
(
01:46
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2022 00:46:21 +0000
(
01:46
+0100)
Apparently Chromium handles default behaviour of mouse events
differently, and we need to suppress it like this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 519c6fe6ff91a1b0eed2831b968f93da87cef5f5..8039a000b6f75693d4f24cb605bd92faa715c7c5 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-1026,6
+1026,8
@@
function some_mousedown(e : MouseEvent) {
if (e.ctrlKey) {
return;
} else {
+ e.preventDefault();
+ e.stopPropagation();
drag_mousedown(e, e.shiftKey);
}
}