Bug 736014 - "Copy rule" with some text selected copies that text additionally; r=paul

This commit is contained in:
Michael Ratcliffe 2012-03-15 14:37:58 +00:00
parent 93034120e5
commit 1c78bee43d
2 changed files with 5 additions and 0 deletions

View File

@ -1247,6 +1247,10 @@ InspectorUI.prototype = {
if (computed) {
computed.parentNode.removeChild(computed);
}
let autosizer = node.querySelector(".autosizer");
if (autosizer) {
autosizer.parentNode.removeChild(autosizer);
}
}
let text = node.textContent;

View File

@ -1375,6 +1375,7 @@ InplaceEditor.prototype = {
// up to the client), and b) without tweaking the style of the
// original element, it might wrap differently or something.
this._measurement = this.doc.createElementNS(HTML_NS, "span");
this._measurement.className = "autosizer";
this.elt.parentNode.appendChild(this._measurement);
let style = this._measurement.style;
style.visibility = "hidden";