From 85adef06f47da40347efc499caedf14c65f3de6c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 5 Dec 2018 09:11:12 +0300 Subject: [PATCH] onkeydown handlers: fix default keyboard events not being blocked if necessary --- js/Feeds.js | 2 +- js/prefs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/Feeds.js b/js/Feeds.js index 555f8f59f..07bc37192 100644 --- a/js/Feeds.js +++ b/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()) { diff --git a/js/prefs.js b/js/prefs.js index c89c0494f..afbdee0c9 100755 --- a/js/prefs.js +++ b/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();