From 6236d3bd6a8aeb3352ec2b87d600a33d2eaae6b2 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Sun, 26 Nov 2006 19:12:19 +0000 Subject: [PATCH] Followup to bug 355064 to update the spelling items last to hack around the editor context menu hacks r=IanN git-svn-id: svn://10.0.0.236/trunk@215844 18797224-902f-48f8-a5cc-f745e15eee43 --- .../ui/composer/content/EditorContextMenu.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/mozilla/editor/ui/composer/content/EditorContextMenu.js b/mozilla/editor/ui/composer/content/EditorContextMenu.js index 24efbac1f01..b672380052f 100644 --- a/mozilla/editor/ui/composer/content/EditorContextMenu.js +++ b/mozilla/editor/ui/composer/content/EditorContextMenu.js @@ -42,19 +42,6 @@ function EditorFillContextMenu(event, contextMenuNode) if ( event.target != contextMenuNode ) return; - // if we have a mispelled word, show spellchecker context - // menuitems as well as the usual context menu - InlineSpellCheckerUI.clearSuggestionsFromMenu(); - InlineSpellCheckerUI.initFromEvent(document.popupRangeParent, document.popupRangeOffset); - var onMisspelling = InlineSpellCheckerUI.overMisspelling; - document.getElementById('spellCheckSuggestionsSeparator').hidden = !onMisspelling; - document.getElementById('spellCheckAddToDictionary').hidden = !onMisspelling; - document.getElementById('spellCheckIgnoreWord').hidden = !onMisspelling; - var separator = document.getElementById('spellCheckAddSep'); - separator.hidden = !onMisspelling; - document.getElementById('spellCheckNoSuggestions').hidden = !onMisspelling || - InlineSpellCheckerUI.addSuggestionsToMenu(contextMenuNode, separator, 5); - // Setup object property menuitem var objectName = InitObjectPropertiesMenuitem("objectProperties_cm"); var isInLink = objectName == "href"; @@ -130,6 +117,19 @@ function EditorFillContextMenu(event, contextMenuNode) ShowMenuItem("tableInsertMenu_cm", inCell); ShowMenuItem("tableSelectMenu_cm", inCell); ShowMenuItem("tableDeleteMenu_cm", inCell); + + // if we have a mispelled word, show spellchecker context + // menuitems as well as the usual context menu + InlineSpellCheckerUI.clearSuggestionsFromMenu(); + InlineSpellCheckerUI.initFromEvent(document.popupRangeParent, document.popupRangeOffset); + var onMisspelling = InlineSpellCheckerUI.overMisspelling; + document.getElementById('spellCheckSuggestionsSeparator').hidden = !onMisspelling; + document.getElementById('spellCheckAddToDictionary').hidden = !onMisspelling; + document.getElementById('spellCheckIgnoreWord').hidden = !onMisspelling; + var separator = document.getElementById('spellCheckAddSep'); + separator.hidden = !onMisspelling; + document.getElementById('spellCheckNoSuggestions').hidden = !onMisspelling || + InlineSpellCheckerUI.addSuggestionsToMenu(contextMenuNode, separator, 5); } function IsItemOrCommandEnabled( item )