Bug 1544530 - [sync 132] - Add toggleShortcutsModal call to onEscape function r=jlast
authorMiriam Budayr <35577323+miriambudayr@users.noreply.github.com>
Tue, 16 Apr 2019 16:52:29 +0000
changeset 469769 09bffecb192b
parent 469768 af78616388ce
child 469770 4b2f5b362c25
push id35882
push usercbrindusan@mozilla.com
push dateWed, 17 Apr 2019 15:54:01 +0000
treeherdermozilla-central@37185c0ae520 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1544530
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1544530 - [sync 132] - Add toggleShortcutsModal call to onEscape function r=jlast Differential Revision: https://phabricator.services.mozilla.com/D27713
devtools/client/debugger/src/components/App.js
--- a/devtools/client/debugger/src/components/App.js
+++ b/devtools/client/debugger/src/components/App.js
@@ -147,26 +147,31 @@ class App extends Component<Props, State
 
   onEscape = (_, e) => {
     const {
       activeSearch,
       closeActiveSearch,
       closeQuickOpen,
       quickOpenEnabled
     } = this.props;
+    const { shortcutsModalEnabled } = this.state;
 
     if (activeSearch) {
       e.preventDefault();
       closeActiveSearch();
     }
 
     if (quickOpenEnabled) {
       e.preventDefault();
       closeQuickOpen();
     }
+
+    if (shortcutsModalEnabled) {
+      this.toggleShortcutsModal();
+    }
   };
 
   onCommandSlash = () => {
     this.toggleShortcutsModal();
   };
 
   isHorizontal() {
     return this.props.orientation === "horizontal";