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); this.entryScrollIntoView(this.index + (e.deltaY > 0 ? 1 : -1), null, true);
e.preventDefault(); e.preventDefault();
} }
} } else if (e.shiftKey) {
if (e.shiftKey) {
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();
} else if (delta < 0) { } else if (delta < 0) {
this.poppedTermView(); this.poppedTermView();
e.preventDefault();
} }
} }
} }