Fix shortcut dialog toggling
This commit is contained in:
parent
367c9401eb
commit
d06aef511f
|
@ -1491,12 +1491,17 @@ UI.hideUserMediaPermissionsGuidanceOverlay = function () {
|
||||||
* Shows or hides the keyboard shortcuts panel, depending on the current state.'
|
* Shows or hides the keyboard shortcuts panel, depending on the current state.'
|
||||||
*/
|
*/
|
||||||
UI.toggleKeyboardShortcutsPanel = function() {
|
UI.toggleKeyboardShortcutsPanel = function() {
|
||||||
let titleKey = 'keyboardShortcuts.keyboardShortcuts';
|
if (!messageHandler.isDialogOpened()) {
|
||||||
let title = APP.translation.translateString(titleKey);
|
let titleKey = 'keyboardShortcuts.keyboardShortcuts';
|
||||||
let msg = $('#keyboard-shortcuts').html();
|
let title = APP.translation.translateString(titleKey);
|
||||||
let buttons = { Close: true };
|
let msg = $('#keyboard-shortcuts').html();
|
||||||
|
let buttons = { Close: true };
|
||||||
|
|
||||||
|
messageHandler.openDialog(title, msg, true, buttons);
|
||||||
|
} else {
|
||||||
|
messageHandler.closeDialog();
|
||||||
|
}
|
||||||
|
|
||||||
messageHandler.openDialog(title, msg, true, buttons);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -373,6 +373,15 @@ var messageHandler = {
|
||||||
|
|
||||||
enablePopups: function (enable) {
|
enablePopups: function (enable) {
|
||||||
popupEnabled = enable;
|
popupEnabled = enable;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if dialog is opened
|
||||||
|
* false otherwise
|
||||||
|
* @returns {boolean} isOpened
|
||||||
|
*/
|
||||||
|
isDialogOpened: function () {
|
||||||
|
return !!$.prompt.getCurrentStateName();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue