mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 13:28:11 +01:00
Fix variable collision in editor.js.
This commit is contained in:
@@ -272,10 +272,10 @@ var Editor = Module("editor", {
|
|||||||
column = 1 + pre.replace(/[^]*\n/, "").length;
|
column = 1 + pre.replace(/[^]*\n/, "").length;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var editor = window.GetCurrentEditor ? GetCurrentEditor()
|
var editor_ = window.GetCurrentEditor ? GetCurrentEditor()
|
||||||
: Editor.getEditor(document.commandDispatcher.focusedWindow);
|
: Editor.getEditor(document.commandDispatcher.focusedWindow);
|
||||||
dactyl.assert(editor);
|
dactyl.assert(editor_);
|
||||||
text = Array.map(editor.rootElement.childNodes, function (e) util.domToString(e, true)).join("");
|
text = Array.map(editor_.rootElement.childNodes, function (e) util.domToString(e, true)).join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
let origGroup = textBox && textBox.getAttributeNS(NS, "highlight") || "";
|
let origGroup = textBox && textBox.getAttributeNS(NS, "highlight") || "";
|
||||||
@@ -312,9 +312,9 @@ var Editor = Module("editor", {
|
|||||||
if (textBox)
|
if (textBox)
|
||||||
textBox.value = val;
|
textBox.value = val;
|
||||||
else {
|
else {
|
||||||
while (editor.rootElement.firstChild)
|
while (editor_.rootElement.firstChild)
|
||||||
editor.rootElement.removeChild(editor.rootElement.firstChild);
|
editor_.rootElement.removeChild(editor_.rootElement.firstChild);
|
||||||
editor.rootElement.innerHTML = val;
|
editor_.rootElement.innerHTML = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user