Closed Bug 75747 Opened 24 years ago Closed 24 years ago

selected item does not appear highlighted when clicked initially in spellchecker

Categories

(Core :: DOM: Editor, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: shrir, Assigned: cmanske)

Details

Attachments

(3 files)

All platforms Steps: 1 Launch composer 2 Type the text " sote text" ( i meant 'some text') 3 Click on Spellchecker button 4 Spellchecker opens up, in the list titled 'Suggestions' , click on any item with the mouse to select it 5 Observe that the item gets added to the textfield labled 'Change to' but does not appear selected (blue background) even after you clicked on it the first time Works the second time onwards...
by 'click' , I meant 'left click once'
Over to cmanske for investigation. Charley is this an XPFE/skin problem?
Assignee: kin → cmanske
btw, happens in both skins (mod ,classic)
This is a pain! Setting the contents of the textbox triggers the "oninput" handler, which unselects the list item. IMHO, that shouldn't happen -- only user input by typing or pasting should trigger that method. Chris and David: Is this correct behavior? We unselect the list when user types because now the selected word in list probably doesn't correspond. The fanciest solution would be to search through the list and select an item if it equals the current textbox contents.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
ready to review
Keywords: patch, review
Whiteboard: FIX IN HAND need r=, sr=
+ var wordInList; + for (var i = 0; (wordInList=GetTreelistValueAt(dialog.SuggestedList, i)); i++) + { Hmmm, using GetTreelistValueAt() as the loop control makes me nervous since it returns a string. I know it works, but could we just fetch the length of the tree, use the expression (i < length), and move the GetTreelistValueAt() into the body of the loop? sr=kin@netscape.com
There is no easy way to get number of items in a tree. The tree is a nest of child nodes: tree->treechildren->treeitem->treerow->treecell, and even if we count number of treeitems, we'd have to check for the 'label' string, which is always "" if none exists. It seems very efficient and safe to me. Simon?
I still think first attachment is adequate - I'll let reviews decide.
sr=sfraser
Latest patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Keywords: review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND need r=, sr=
verif on all 3 builds (0424).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: