From 86ff831600254329bd52e90eb141a1c2c8e3d031 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Thu, 28 Nov 2019 15:24:00 +0200 Subject: preventDefault correctly --- ext/mixed/js/display.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index bd4b13d1..f81ea7ee 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -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(); } } } -- cgit v1.2.3