prevent unwanted wheel events on history bar

This commit is contained in:
siikamiika 2020-02-05 14:19:48 +02:00
parent e8701cb950
commit 8eac191c97

View File

@ -221,13 +221,16 @@ class Display {
} }
onHistoryWheel(e) { onHistoryWheel(e) {
if (e.altKey) { return; }
const delta = -e.deltaX || e.deltaY; const delta = -e.deltaX || e.deltaY;
if (delta > 0) { if (delta > 0) {
this.sourceTermView(); this.sourceTermView();
e.preventDefault(); e.preventDefault();
e.stopPropagation();
} else if (delta < 0) { } else if (delta < 0) {
this.nextTermView(); this.nextTermView();
e.preventDefault(); e.preventDefault();
e.stopPropagation();
} }
} }