Bug 719783 - In the Rule View, pressing Escape close the whole Inspector. r=dcamp
authorPaul Rouget <paul@mozilla.com>
Fri, 20 Jan 2012 16:36:35 +0100
changeset 86563 7fb03c72dbb060b935230b39ea4d18515e44e229
parent 86562 01a1a9d501067995a4748d8327af189974230494
child 86564 ffaed1950e3bd2a4807da316ebe836fcfc6b09e7
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs719783
milestone12.0a1
Bug 719783 - In the Rule View, pressing Escape close the whole Inspector. r=dcamp
browser/devtools/styleinspector/CssRuleView.jsm
--- a/browser/devtools/styleinspector/CssRuleView.jsm
+++ b/browser/devtools/styleinspector/CssRuleView.jsm
@@ -1305,16 +1305,17 @@ InplaceEditor.prototype = {
       prevent = true;
       moveFocus(this.input.ownerDocument.defaultView, FOCUS_FORWARD);
     } else if (aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE) {
       // Cancel and blur ourselves.  |_onBlur| will call the user's
       // done handler for us.
       prevent = true;
       this.cancelled = true;
       this.input.blur();
+      aEvent.stopPropagation();
     } else if (aEvent.keyCode === Ci.nsIDOMKeyEvent.DOM_VK_SPACE) {
       // No need for leading spaces here.  This is particularly
       // noticable when adding a property: it's very natural to type
       // <name>: (which advances to the next property) then spacebar.
       prevent = !this.input.value;
     }
 
     if (prevent) {