Closed Bug 343303 Opened 18 years ago Closed 18 years ago

onblur fires before onchange for comboboxes

Categories

(Core :: DOM: Events, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: smaug)

References

Details

(Keywords: regression)

Attachments

(1 file)

We used to fire onchange before onblur.  To reproduce:

1)  Load https://bugzilla.mozilla.org/attachment.cgi?id=227653&action=view
2)  Tab to the first <select> (the combobox) or focus it with mouse (but have
    it closed).
3)  Hit the down arrow key.
4)  Hit tab

ACTUAL RESULTS:  Output box shows blur, then change

EXPECTED RESULTS:  Change, then blur

I have the following range for this:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-03-05+17&maxdate=2006-03-07+20&cvsroot=%2Fcvsroot

but that's a 2-day range; if someone has builds in between there, that would help narrow it more.

Given the range, the most likely cause looks like the event dispatch changes...
I see the change between 1.9a1_2006030704 and 1.9a1_2006030713.
Assignee: events → Olli.Pettay
A testcase would be great
Attached patch proposed patchSplinter Review
Oops, my mistake :)

Put back the old behaviour. In 1.8 the SetFocus call is before event handling.
http://lxr.mozilla.org/mozilla1.8/source/content/html/content/src/nsHTMLSelectElement.cpp#1782
http://lxr.mozilla.org/seamonkey/source/content/html/content/src/nsHTMLSelectElement.cpp#1818
Attachment #228031 - Flags: superreview?(bzbarsky)
Attachment #228031 - Flags: review?(bzbarsky)
Comment on attachment 228031 [details] [diff] [review]
proposed patch

Ah, indeed.  ;)  r+sr=bzbarsky
Attachment #228031 - Flags: superreview?(bzbarsky)
Attachment #228031 - Flags: superreview+
Attachment #228031 - Flags: review?(bzbarsky)
Attachment #228031 - Flags: review+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: