From cb13b387855546c41a2c4473adb831199ee16b93 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 26 Mar 2011 17:36:26 -0400 Subject: [PATCH] Fix variable collision in editor.js. --- common/content/editor.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/content/editor.js b/common/content/editor.js index 6f4e8836..86b8440c 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -272,10 +272,10 @@ var Editor = Module("editor", { column = 1 + pre.replace(/[^]*\n/, "").length; } else { - var editor = window.GetCurrentEditor ? GetCurrentEditor() - : Editor.getEditor(document.commandDispatcher.focusedWindow); - dactyl.assert(editor); - text = Array.map(editor.rootElement.childNodes, function (e) util.domToString(e, true)).join(""); + var editor_ = window.GetCurrentEditor ? GetCurrentEditor() + : Editor.getEditor(document.commandDispatcher.focusedWindow); + dactyl.assert(editor_); + text = Array.map(editor_.rootElement.childNodes, function (e) util.domToString(e, true)).join(""); } let origGroup = textBox && textBox.getAttributeNS(NS, "highlight") || ""; @@ -312,9 +312,9 @@ var Editor = Module("editor", { if (textBox) textBox.value = val; else { - while (editor.rootElement.firstChild) - editor.rootElement.removeChild(editor.rootElement.firstChild); - editor.rootElement.innerHTML = val; + while (editor_.rootElement.firstChild) + editor_.rootElement.removeChild(editor_.rootElement.firstChild); + editor_.rootElement.innerHTML = val; } }