All users were logged out of Bugzilla on October 13th, 2018

selected item does not appear highlighted when clicked initially in spellchecker

VERIFIED FIXED in mozilla0.9.1

Status

()

VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: shrir, Assigned: cmanske)

Tracking

Trunk
mozilla0.9.1
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
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...
(Reporter)

Comment 1

18 years ago
by 'click' , I meant 'left click once' 

Comment 2

18 years ago
Over to cmanske for investigation. Charley is this an XPFE/skin problem?
Assignee: kin → cmanske
(Reporter)

Comment 3

18 years ago
btw, happens in both skins (mod ,classic)
(Assignee)

Comment 4

18 years ago
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
(Assignee)

Comment 5

18 years ago
Created attachment 30642 [details] [diff] [review]
Select word in list that matches the input field's value
(Assignee)

Comment 6

18 years ago
ready to review
Keywords: patch, review
Whiteboard: FIX IN HAND need r=, sr=

Comment 7

18 years ago
+    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
(Assignee)

Comment 8

18 years ago
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?
(Assignee)

Comment 9

18 years ago
Created attachment 30809 [details] [diff] [review]
Alternate fix that counts number of items in suggested list
(Assignee)

Comment 10

18 years ago
I still think first attachment is adequate - I'll let reviews decide.
(Assignee)

Comment 11

18 years ago
Created attachment 30815 [details] [diff] [review]
Update on last fix to not abort loop if empty item in middle of list

Comment 12

18 years ago
sr=sfraser
(Assignee)

Comment 13

18 years ago
Latest patch checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Keywords: review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND need r=, sr=
(Reporter)

Comment 14

18 years ago
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.