Bug 1046803 - Use normal whitespace in editor pre tags. r=pbrosset

This commit is contained in:
Brian Grinstead
2015-04-28 16:15:00 -04:00
parent 5af8f706aa
commit ede2af06a5
2 changed files with 3 additions and 2 deletions

View File

@@ -85,7 +85,7 @@
--></span>
<span id="template-text" save="${elt}" class="editor text">
<pre save="${value}" style="display:inline-block;" tabindex="0"></pre>
<pre save="${value}" style="display:inline-block; white-space: normal;" tabindex="0"></pre>
</span>
<span id="template-comment"

View File

@@ -247,6 +247,8 @@ function InplaceEditor(aOptions, aEvent)
this.input.addEventListener("keyup", this._onKeyup, false);
}
this._updateSize();
if (aOptions.start) {
aOptions.start(this, aEvent);
}
@@ -364,7 +366,6 @@ InplaceEditor.prototype = {
// account for the fact that after adding a newline the <pre> doesn't grow
// unless there's text content on the line.
width += 15;
this._measurement.textContent += "M";
this.input.style.height = this._measurement.offsetHeight + "px";
}