Closed
Bug 100188
Opened 25 years ago
Closed 24 years ago
Dropdown saves wrong index when using mouse & keyboard
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: jhpedemonte, Assigned: john)
References
()
Details
(Whiteboard: [eapp])
Attachments
(1 file)
|
4.02 KB,
patch
|
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
Build 2001091703.
1) Go to http://www.pc.ibm.com/
2) Click on the dropdown "Please choose a country:" in order to display its
contents.
3) Move your mouse over to "Argentina" so that it is highlighted, but don't click.
4) Press tab to close dropdown and move to the "Go" button. Notice that the
value selected still shows up as "Please select a country:"
5) Click "Go"
Expected results:
The same page should load since no selection was made
Actual results:
Takes you to Latin-America site. If you go back to the previous page,
"Argentina" is now selected in the dropdown.
| Reporter | ||
Comment 1•25 years ago
|
||
This is causes by different indices stored in nsCombobox vs nsListControlFrame.
While nsCombobox retains the correct value, nsListControlFrame updates the
index to the element that the mouse highlights. I was able to fix the problem
with this code in nsCombobox:
nsComboboxControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
{
if (aOn) {
mFocused = this;
} else {
mFocused = nsnull;
if (mDroppedDown) {
+ ((nsListControlFrame*)mListControlFrame)->SetOptionSelected(
+ mSelectedIndex, PR_TRUE );
ToggleList(mPresContext);
}
}
However, this probably is more of a hack than the correct fix.
| Reporter | ||
Comment 3•24 years ago
|
||
Any idea about this bug? It wasn't fixed with the rewrite of
nsListControlFrame.
| Assignee | ||
Comment 4•24 years ago
|
||
Hmm, this must be because when focus is lost from the combobox we are not
properly resetting the value. This is bad. I think I will be able to tackle
it, but not until 110800 lands, which touches the same code heavily.
Updated•24 years ago
|
Whiteboard: [eapp]
Major corporations depend on eapp bugs, and need them to be fixed before they
can recommend Mozilla-based products to their customers. Adding nsbeta1+ keyword
and making sure the bugs get re-evaluated if they are targeted beyond 1.0.
Keywords: nsbeta1+
Comment 6•24 years ago
|
||
eapp was incorrectly used to change this to nsbeta1+. Resetting to nsbeta1 to
nominate. This is an important issue and deserves to be nsbeta1+ by the ADT.
| Assignee | ||
Comment 7•24 years ago
|
||
This fixes the problem by calling the ComboboxFinish() method of the list box,
which checks the selected index and sets it and fires on change if necessary.
Comment 8•24 years ago
|
||
r=rods
Comment 10•24 years ago
|
||
Comment on attachment 69363 [details] [diff] [review]
Patch
sr=attinasi
Attachment #69363 -
Flags: superreview+
| Assignee | ||
Comment 11•24 years ago
|
||
checked in (last night)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 12•24 years ago
|
||
verified fixed on
win2000 -- build ID : 2002-03-22-05trunk
mac 9.1 -- cuild Id : 2002-03-13-08trunk
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•