Bug 233275 Double-clicking an empty area of the suggested word list incorrectly replaces words r=glazou sr=mscott

git-svn-id: svn://10.0.0.236/trunk@154938 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk
2004-04-15 20:32:06 +00:00
parent b20450e3e9
commit 437e8d4453
2 changed files with 8 additions and 4 deletions

View File

@@ -365,9 +365,11 @@ function IgnoreAll()
NextWord();
}
function Replace()
function Replace(newWord)
{
var newWord = gDialog.ReplaceWordInput.value;
if (!newWord)
return;
if (gMisspelledWord && gMisspelledWord != newWord)
{
var editor = GetCurrentEditor();

View File

@@ -76,13 +76,15 @@
<rows>
<row flex="1">
<!-- BUG! setting class="MinWidth20em" on tree doesn't work (width=0) -->
<listbox rows="6" id="SuggestedList" onselect="SelectSuggestedWord()" ondblclick="Replace();"/>
<listbox rows="6" id="SuggestedList" onselect="SelectSuggestedWord()"
ondblclick="if (gAllowSelectWord) Replace(event.target.getAttribute('label'));"/>
<vbox>
<grid flex="1">
<columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>
<rows>
<row>
<button id="Replace" oncommand="Replace();" label="&replaceButton.label;"
<button id="Replace" label="&replaceButton.label;"
oncommand="Replace(gDialog.ReplaceWordInput.value);"
accesskey="&replaceButton.accessKey;"/>
<button id="Ignore" oncommand="Ignore();" label="&ignoreButton.label;"
accesskey="&ignoreButton.accessKey;"/>