preventDefault correctly

This commit is contained in:
siikamiika 2019-11-28 15:24:00 +02:00
parent beea89a421
commit 86ff831600

View File

@ -222,14 +222,14 @@ class Display {
this.entryScrollIntoView(this.index + (e.deltaY > 0 ? 1 : -1), null, true);
e.preventDefault();
}
}
if (e.shiftKey) {
} else if (e.shiftKey) {
const delta = e.deltaX || e.deltaY;
if (delta > 0) {
this.sourceTermView();
e.preventDefault();
} else if (delta < 0) {
this.poppedTermView();
e.preventDefault();
}
}
}