onblur fires before onchange for comboboxes

RESOLVED FIXED

Status

()

Core
DOM: Events
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: bz, Assigned: smaug)

Tracking

({regression})

Trunk
x86
Linux
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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)

Updated

12 years ago
Assignee: events → Olli.Pettay
(Assignee)

Comment 3

12 years ago
A testcase would be great
(Assignee)

Comment 4

12 years ago
nm
(Assignee)

Comment 5

12 years ago
Created attachment 228031 [details] [diff] [review]
proposed patch

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

Updated

12 years ago
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.