From 2cacf33420f55c2f96f2100ffa1f93c7c926b598 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Fri, 18 May 2001 19:59:17 +0000 Subject: [PATCH] Fix for bug 81677; update commands _after_ setting focus when switching view modes. r=timeless, sr=blizzard git-svn-id: svn://10.0.0.236/trunk@95402 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/ui/composer/content/editor.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mozilla/editor/ui/composer/content/editor.js b/mozilla/editor/ui/composer/content/editor.js index 231242879f6..2da0f388c42 100644 --- a/mozilla/editor/ui/composer/content/editor.js +++ b/mozilla/editor/ui/composer/content/editor.js @@ -1250,8 +1250,6 @@ function SetDisplayMode(mode) gFormatToolbar.setAttribute("hidden", "true"); } - // update commands to disable stuff - window.updateCommands("mode_switch"); gSourceContentWindow.focus(); } else @@ -1265,12 +1263,12 @@ function SetDisplayMode(mode) gFormatToolbar.setAttribute("hidden", gFormatToolbarHidden); } - // update commands to re-enable stuff - window.updateCommands("mode_switch"); - gContentWindow.focus(); } + // update commands to disable or re-enable stuff + window.updateCommands("mode_switch"); + // We must set check on menu item since toolbar may have been used document.getElementById("viewPreviewMode").setAttribute("checked","false"); document.getElementById("viewNormalMode").setAttribute("checked","false");