From 579f9eaa60c35eef43a534419c776dfafe03e415 Mon Sep 17 00:00:00 2001 From: azivner Date: Thu, 24 Aug 2017 22:48:00 -0400 Subject: [PATCH] key binding registration changed from keypress to keydown because the former doesn't work in chrome --- static/js/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/init.js b/static/js/init.js index 3b1c5ee4b..7e571acb8 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -9,14 +9,14 @@ $(function() { jQuery.hotkeys.options.filterInputAcceptingElements = true; jQuery.hotkeys.options.filterContentEditable = true; -$(document).bind('keypress', 'alt+ctrl+h', function() { +$(document).bind('keydown', 'alt+ctrl+h', function() { const toggle = $(".hide-toggle"); // use visibility instead of display so that content isn't moved around and stays set in place toggle.css('visibility', toggle.css('visibility') === 'hidden' ? 'visible' : 'hidden'); }); -$(document).bind('keypress', 'alt+q', function() { +$(document).bind('keydown', 'alt+q', function() { $("#recentNotesDialog").dialog({ modal: true });