From 23a38eac61f44c0ee3baed68ddcf23f28c03b20d Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Tue, 19 Dec 2017 16:18:48 +0000 Subject: Fix shortcut links on help page --- app/assets/javascripts/shortcuts.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts/shortcuts.js') diff --git a/app/assets/javascripts/shortcuts.js b/app/assets/javascripts/shortcuts.js index 130730b1700..d2f0d7410da 100644 --- a/app/assets/javascripts/shortcuts.js +++ b/app/assets/javascripts/shortcuts.js @@ -51,7 +51,10 @@ export default class Shortcuts { } onToggleHelp(e) { - e.preventDefault(); + if (e.preventDefault) { + e.preventDefault(); + } + Shortcuts.toggleHelp(this.enabledHelp); } @@ -112,6 +115,9 @@ export default class Shortcuts { static focusSearch(e) { $('#search').focus(); - e.preventDefault(); + + if (e.preventDefault) { + e.preventDefault(); + } } } -- cgit v1.2.1