From f4c71026b7a918d81658ca50bec21ea25cd09cc7 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 3 Aug 2020 20:42:04 +1200 Subject: [PATCH] Modal detection through less-than-ideal jQuery --- src/js/components/Hotkeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/components/Hotkeys.js b/src/js/components/Hotkeys.js index 92e61e39..b698f79e 100755 --- a/src/js/components/Hotkeys.js +++ b/src/js/components/Hotkeys.js @@ -158,7 +158,7 @@ class Hotkeys extends React.Component { uiActions.dragEnd(); prevent = true; if (allow_reporting) ReactGA.event({ category: 'Hotkey', action: key, label: 'Dragging' }); - } else if (modal) { + } else if ($('body').hasClass('modal-open')) { window.history.back(); prevent = true; if (allow_reporting) ReactGA.event({ category: 'Hotkey', action: key, label: 'Modal' });