Modal detection through less-than-ideal jQuery

This commit is contained in:
James Barnsley
2020-08-03 20:42:04 +12:00
parent e398949a06
commit f4c71026b7

View File

@ -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' });