Bug 1343455 - Toggling checkbox for CSS rule in editor shouldn't expand collapsed computed rules. r?gl draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 01 Mar 2017 16:00:48 +0100
changeset 490919 33561b1269993e85c5ddb3fe97bdf161c53de307
parent 490871 34c6c2f302e7b48e3ad2cec575cbd34d423a9d32
child 547423 4180880f45ce3925516148213abbfe4257c51bca
push id47276
push userarchaeopteryx@coole-files.de
push dateWed, 01 Mar 2017 15:02:37 +0000
reviewersgl
bugs1343455
milestone54.0a1
Bug 1343455 - Toggling checkbox for CSS rule in editor shouldn't expand collapsed computed rules. r?gl MozReview-Commit-ID: GRa15joVxpH
devtools/client/inspector/rules/rules.js
--- a/devtools/client/inspector/rules/rules.js
+++ b/devtools/client/inspector/rules/rules.js
@@ -1217,17 +1217,18 @@ CssRuleView.prototype = {
    */
   _highlightProperty: function (editor) {
     let isPropertyHighlighted = this._highlightRuleProperty(editor);
     let isComputedHighlighted = this._highlightComputedProperty(editor);
 
     // Expand the computed list if a computed property is highlighted and the
     // property rule is not highlighted
     if (!isPropertyHighlighted && isComputedHighlighted &&
-        !editor.computed.hasAttribute("user-open")) {
+        !editor.computed.hasAttribute("user-open") &&
+        editor.expander.hasAttribute("open")) {
       editor.expandForFilter();
     }
 
     return isPropertyHighlighted || isComputedHighlighted;
   },
 
   /**
    * Called when TextPropertyEditor is updated and updates the rule property