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) {
if (e.altKey) { return; }
const delta = -e.deltaX || e.deltaY;
if (delta > 0) {
this.sourceTermView();
e.preventDefault();
e.stopPropagation();
} else if (delta < 0) {
this.nextTermView();
e.preventDefault();
e.stopPropagation();
}
}