Bug 1327121 - Open split console on esc press when inspector search selected. r=jdescottes, a=lizzard
authorAndrew Xia <andrewxia2@gmail.com>
Sun, 26 Feb 2017 17:34:20 -0800
changeset 378875 ff92ddc470715eeb1952b4ef7242f85c9836dcc0
parent 378874 dd529ec5fef6cf0f1db2db40e316467d54a04361
child 378876 3fc56f904d53def46fb38a7b7b071e23f3d58347
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes, lizzard
bugs1327121
milestone53.0a2
Bug 1327121 - Open split console on esc press when inspector search selected. r=jdescottes, a=lizzard
devtools/client/inspector/inspector-search.js
--- a/devtools/client/inspector/inspector-search.js
+++ b/devtools/client/inspector/inspector-search.js
@@ -325,17 +325,16 @@ SelectorAutocompleter.prototype = {
     this.panelDoc = null;
   },
 
   /**
    * Handles keypresses inside the input box.
    */
   _onSearchKeypress: function (event) {
     let popup = this.searchPopup;
-
     switch (event.keyCode) {
       case KeyCodes.DOM_VK_RETURN:
       case KeyCodes.DOM_VK_TAB:
         if (popup.isOpen) {
           if (popup.selectedItem) {
             this.searchBox.value = popup.selectedItem.label;
           }
           this.hidePopup();
@@ -368,16 +367,19 @@ SelectorAutocompleter.prototype = {
           }
           this.searchBox.value = popup.selectedItem.label;
         }
         break;
 
       case KeyCodes.DOM_VK_ESCAPE:
         if (popup.isOpen) {
           this.hidePopup();
+        } else {
+          this.emit("processing-done");
+          return;
         }
         break;
 
       default:
         return;
     }
 
     event.preventDefault();