Bug 1243695 - ensure caret is visible in ruleview prop editor;r=miker
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 12 Feb 2016 01:43:44 +0100
changeset 284504 a09ce178cd1d53cf3f3e40b6e2c687513780def4
parent 284503 7cadf2b9abbc4855101813635e38a539fe7bc37b
child 284505 d639c8e4b8899f4c477c12378db92f7d6c5f1742
push id71993
push usercbook@mozilla.com
push dateWed, 17 Feb 2016 11:16:29 +0000
treeherdermozilla-inbound@60f020c84b23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmiker
bugs1243695
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1243695 - ensure caret is visible in ruleview prop editor;r=miker
devtools/client/shared/inplace-editor.js
devtools/client/themes/rules.css
--- a/devtools/client/shared/inplace-editor.js
+++ b/devtools/client/shared/inplace-editor.js
@@ -381,16 +381,18 @@ InplaceEditor.prototype = {
       width += 15;
       this.input.style.height = this._measurement.offsetHeight + "px";
     }
 
     if (width === 0) {
       // If the editor is empty use a width corresponding to 1 character.
       this.input.style.width = "1ch";
     } else {
+      // Add 2 pixels to ensure the caret will be visible
+      width = width + 2;
       this.input.style.width = width + "px";
     }
   },
 
   /**
    * Get the width of a single character in the input to properly position the
    * autocompletion popup.
    */
--- a/devtools/client/themes/rules.css
+++ b/devtools/client/themes/rules.css
@@ -314,17 +314,17 @@
 
 .theme-light .ruleview-overridden {
   text-decoration-color: var(--theme-content-color3);
 }
 
 .styleinspector-propertyeditor {
   border: 1px solid #CCC;
   padding: 0;
-  margin: -1px;
+  margin: -1px -3px -1px -1px;
 }
 
 .ruleview-property {
   border-left: 3px solid transparent;
   clear: right;
 }
 
 .ruleview-propertycontainer  > * {