Last Comment Bug 313260 - [FIX] Combobox changes value if a reflow occurs while menu is dropped down
: [FIX] Combobox changes value if a reflow occurs while menu is dropped down
: fixed1.8, regression, testcase
Product: Core
Classification: Components
Component: Layout: Form Controls (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Mats Palmgren (:mats)
Depends on:
Blocks: 297389
  Show dependency treegraph
Reported: 2005-10-21 05:55 PDT by Martijn Wargers [:mwargers] (not working for Mozilla)
Modified: 2005-10-23 12:43 PDT (History)
6 users (show)
asa: blocking1.8rc1+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch rev. 1 (1.37 KB, patch)
2005-10-21 19:14 PDT, Mats Palmgren (:mats)
bzbarsky: review+
bzbarsky: superreview+
asa: approval1.8rc1+
Details | Diff | Splinter Review

Description Martijn Wargers [:mwargers] (not working for Mozilla) 2005-10-21 05:55:47 PDT
To reproduce:
- Visit url testcase, and follow the steps in the testcase

Afterwards, the selected option has become "1", it should have stayed "3".
Mozilla1.7 and IE6 both keep the selected option "3".
I very much suspect this is a regression from bug 286170 itself, since I can see
the bug also in a SeaMonkey 2005-07-11 build.
Comment 1 Martijn Wargers [:mwargers] (not working for Mozilla) 2005-10-21 08:34:48 PDT
This regressed between 2005-06-20 and 2005-06-22 and I've checked in my debug
build that bug 295571 isn't the cause of this/
Comment 2 Hermann Schwab 2005-10-21 08:52:51 PDT
The number hovered in the moment when 5 is removed, gets set as default option.
Load attachment 179320 [details], drop down the combobox menu and hover "2", and wait
until "5" gets removed. "5" can't be selected when "5" is removed, so the first
item gets selected.
Comment 3 Mats Palmgren (:mats) 2005-10-21 14:13:49 PDT
I get the same regression range. I backed out bug 286170 locally and still see
the bug though. I'll take a look...
Comment 4 Mats Palmgren (:mats) 2005-10-21 19:11:33 PDT
Regression is from bug 297389. It's quite bad actually, if we get a reflow
while the menu is dropped down we will select the item that is hovered by
the mouse. To reproduce:
1. click on any combobox (to drop down the menu)
2. hover an item different from the currently selected value
3. text zoom (CTRL++)  => combobox value changes to what was hovered
Comment 5 Mats Palmgren (:mats) 2005-10-21 19:14:27 PDT
Created attachment 200412 [details] [diff] [review]
Patch rev. 1
Comment 6 Boris Zbarsky [:bz] (TPAC) 2005-10-21 19:53:22 PDT
Comment on attachment 200412 [details] [diff] [review]
Patch rev. 1

r+sr=bzbarsky.	Please check this in on trunk ASAP and request branch approval.
Comment 7 Mats Palmgren (:mats) 2005-10-21 21:33:00 PDT
Checked in to trunk at 2005-10-21 20:47 PDT.

Comment 8 Boris Zbarsky [:bz] (TPAC) 2005-10-21 22:37:13 PDT
This is a very safe fix that we should take on branch.  All it does is make sure
to not change what option is "selected" while the combobox is dropped down.
Comment 9 Asa Dotzler [:asa] 2005-10-23 10:12:49 PDT
bz, what would we need to test to make sure this doesn't break anything else?
Comment 10 Boris Zbarsky [:bz] (TPAC) 2005-10-23 10:46:36 PDT
Modifications to combobox layout (text resize, DOM timeouts firing, etc) while the combobox is dropped down.  The dropped-down state is the only state affected.
Comment 11 Boris Zbarsky [:bz] (TPAC) 2005-10-23 12:17:23 PDT
Checked in on branch.
Comment 12 Martijn Wargers [:mwargers] (not working for Mozilla) 2005-10-23 12:43:32 PDT
Sorry for blaming the wrong bug.

Note You need to log in before you can comment on or make changes to this bug.