Bug 1061003 - Add New Rule won't work in non-english locales. r=harth, a=lmandel
authorGabriel Luong <gabriel.luong@gmail.com>
Tue, 02 Sep 2014 11:27:00 +0200
changeset 216750 bacdfedd7241
parent 216749 06300676d4cd
child 216751 1f599d357743
push id3899
push userryanvm@gmail.com
push date2014-09-15 21:28 +0000
treeherdermozilla-beta@bacdfedd7241 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersharth, lmandel
bugs1061003
milestone33.0
Bug 1061003 - Add New Rule won't work in non-english locales. r=harth, a=lmandel
browser/devtools/styleinspector/rule-view.js
--- a/browser/devtools/styleinspector/rule-view.js
+++ b/browser/devtools/styleinspector/rule-view.js
@@ -1396,17 +1396,17 @@ CssRuleView.prototype = {
       rules.push(newRule);
       let editor = new RuleEditor(this, newRule);
 
       // Insert the new rule editor after the inline element rule
       if (rules.length <= 1) {
         this.element.appendChild(editor.element);
       } else {
         for (let rule of rules) {
-          if (rule.selectorText === "element") {
+          if (rule.domRule.type === ELEMENT_STYLE) {
             let referenceElement = rule.editor.element.nextSibling;
             this.element.insertBefore(editor.element, referenceElement);
             break;
           }
         }
       }
 
       // Focus and make the new rule's selector editable