Bug 1046803 - Use normal whitespace in editor pre tags. r=pbrosset
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
--></span>
|
--></span>
|
||||||
|
|
||||||
<span id="template-text" save="${elt}" class="editor text">
|
<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>
|
||||||
|
|
||||||
<span id="template-comment"
|
<span id="template-comment"
|
||||||
|
|||||||
@@ -247,6 +247,8 @@ function InplaceEditor(aOptions, aEvent)
|
|||||||
this.input.addEventListener("keyup", this._onKeyup, false);
|
this.input.addEventListener("keyup", this._onKeyup, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._updateSize();
|
||||||
|
|
||||||
if (aOptions.start) {
|
if (aOptions.start) {
|
||||||
aOptions.start(this, aEvent);
|
aOptions.start(this, aEvent);
|
||||||
}
|
}
|
||||||
@@ -364,7 +366,6 @@ InplaceEditor.prototype = {
|
|||||||
// account for the fact that after adding a newline the <pre> doesn't grow
|
// account for the fact that after adding a newline the <pre> doesn't grow
|
||||||
// unless there's text content on the line.
|
// unless there's text content on the line.
|
||||||
width += 15;
|
width += 15;
|
||||||
this._measurement.textContent += "M";
|
|
||||||
this.input.style.height = this._measurement.offsetHeight + "px";
|
this.input.style.height = this._measurement.offsetHeight + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user