Browse Source

onkeydown handlers: fix default keyboard events not being blocked if necessary

Andrew Dolgov 1 week ago
parent
commit
85adef06f4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      js/Feeds.js
  2. 1 1
      js/prefs.js

+ 1 - 1
js/Feeds.js

@@ -212,7 +212,7 @@ define(["dojo/_base/declare"], function (declare) {
 
 			App.setLoadingProgress(50);
 
-			document.onkeydown = (event) => { App.hotkeyHandler(event) };
+			document.onkeydown = (event) => { return App.hotkeyHandler(event) };
 			window.setInterval(() => { Headlines.catchupBatched() }, 10 * 1000);
 
 			if (!this.getActive()) {

+ 1 - 1
js/prefs.js

@@ -76,7 +76,7 @@ require(["dojo/_base/kernel",
 				initSecondStage: function() {
 					this.enableCsrfSupport();
 
-					document.onkeydown = (event) => { App.hotkeyHandler(event) };
+					document.onkeydown = (event) => { return App.hotkeyHandler(event) };
 					App.setLoadingProgress(50);
 					Notify.close();