From 8a866e775ce3a8063502ab43149806de3472a0c7 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Tue, 8 May 2007 00:50:09 +0000 Subject: [PATCH] Bug 374982 - The enabled state of the copy command is incorrect in few edge cases. r=gavin. --- .../components/console/content/consoleBindings.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/toolkit/components/console/content/consoleBindings.xml b/toolkit/components/console/content/consoleBindings.xml index d61da14953a..c67383a2ab0 100644 --- a/toolkit/components/console/content/consoleBindings.xml +++ b/toolkit/components/console/content/consoleBindings.xml @@ -44,8 +44,11 @@ return this.mMode; @@ -62,10 +65,12 @@ this.mSelectedItem.removeAttribute("selected"); this.mSelectedItem = val; - val.setAttribute("selected", "true"); + if (val) + val.setAttribute("selected", "true"); // Update edit commands window.updateCommands("focus"); + return val; ]]> @@ -262,6 +267,7 @@ var newRows = this.mConsoleRowBox.cloneNode(false); this.mConsoleRowBox.parentNode.replaceChild(newRows, this.mConsoleRowBox); this.mConsoleRowBox = newRows; + this.selectedItem = null; ]]>