Bug 977345 - Editor should refresh when font size changes. r=robcee
authorAnton Kovalyov <anton@mozilla.com>
Wed, 26 Feb 2014 14:50:26 -0800
changeset 171298 3065c1488d1d76691262e714eccdc31d3a92f0ee
parent 171297 7cb369f62ccf88225d14f9cb1fda78028a5102a9
child 171299 aaf67168e062a182040dbe0e1745cab2c39f23ed
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersrobcee
bugs977345
milestone30.0a1
Bug 977345 - Editor should refresh when font size changes. r=robcee
browser/devtools/sourceeditor/editor.js
--- a/browser/devtools/sourceeditor/editor.js
+++ b/browser/devtools/sourceeditor/editor.js
@@ -770,16 +770,17 @@ Editor.prototype = {
   },
 
   /**
    * Sets font size for the editor area.
    */
   setFontSize: function (size) {
     let cm = editors.get(this);
     cm.getWrapperElement().style.fontSize = parseInt(size, 10) + "px";
+    cm.refresh();
   },
 
   /**
    * Extends an instance of the Editor object with additional
    * functions. Each function will be called with context as
    * the first argument. Context is a {ed, cm} object where
    * 'ed' is an instance of the Editor object and 'cm' is an
    * instance of the CodeMirror object. Example: