Bug 1471893 - Write to a new property if the one we're trying is disabled draft
authorPatrick Brosset <pbrosset@mozilla.com>
Fri, 20 Jul 2018 15:41:37 +0200
changeset 820832 9aec62937dc3967029f95a085c7f37ec67b25c09
parent 820804 4f12d77b4f9b6adaf06615c1c8cdc14de836dc1a
push id116952
push userbmo:pbrosset@mozilla.com
push dateFri, 20 Jul 2018 13:42:21 +0000
bugs1471893
milestone63.0a1
Bug 1471893 - Write to a new property if the one we're trying is disabled MozReview-Commit-ID: B306en6o2M0
devtools/client/inspector/fonts/fonts.js
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -429,17 +429,17 @@ class FontInspector {
    * @return {TextProperty|null}
    */
   getTextProperty(name, value) {
     if (!this.selectedRule) {
       return null;
     }
 
     let textProperty =
-      this.selectedRule.textProps.find(prop => prop.name === name);
+      this.selectedRule.textProps.find(prop => prop.name === name && prop.enabled);
     if (!textProperty) {
       textProperty = this.selectedRule.editor.addProperty(name, value, "", true);
     }
 
     return textProperty;
   }
 
   /**