diff --git a/mozilla/editor/ui/composer/content/ComposerCommands.js b/mozilla/editor/ui/composer/content/ComposerCommands.js index a91fd6bd4fc..a5c22822c7a 100644 --- a/mozilla/editor/ui/composer/content/ComposerCommands.js +++ b/mozilla/editor/ui/composer/content/ComposerCommands.js @@ -1935,7 +1935,30 @@ var nsFindNextCommand = doCommand: function(aCommand) { - window.editorShell.FindNext(); + var prefs = GetPrefs(); + var newfind; + if (prefs) { + try { + newfind = prefs.getBoolPref("editor.new_find"); + } + catch (ex) { + newfind = false; + } + } + if (newfind) + { + try { + var editorXUL = document.getElementById("content-frame"); + var findInst = editorXUL.webBrowserFind; + findInst.findNext(); + } + catch (ex) { + nsFindCommand.doCommand(); + } + } + else { + window.editorShell.FindNext(); + } } };