diff --git a/polygerrit-ui/app/elements/gr-app-element.js b/polygerrit-ui/app/elements/gr-app-element.js index 785e8f9e1a..70806e2da7 100644 --- a/polygerrit-ui/app/elements/gr-app-element.js +++ b/polygerrit-ui/app/elements/gr-app-element.js @@ -497,6 +497,12 @@ class GrAppElement extends mixinBehaviors( [ } _showKeyboardShortcuts(e) { + // same shortcut should close the dialog if pressed again + // when dialog is open + if (this.$.keyboardShortcuts.opened) { + this.$.keyboardShortcuts.close(); + return; + } if (this.shouldSuppressKeyboardShortcut(e)) { return; } this.$.keyboardShortcuts.open(); }