Closed Bug 342011 Opened 19 years ago Closed 19 years ago

xul window load event handlers no longer called with evt.eventPhase == Event.AT_TARGET

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
All
defect
Not set
blocker

Tracking

()

VERIFIED FIXED

People

(Reporter: bc, Assigned: smaug)

References

()

Details

(Keywords: regression)

Attachments

(2 files)

Beginning with 2006-06-16-04 nightly trunk builds, event handlers in xul windows specified either by this.addEventListener('load', loadHandler, true) or via <xul:window onload="loadHandler()"> are no longer called with evt.eventPhase == Event.AT_TARGET but are only called with evt.eventPhase == Event.CAPTURING_PHASE. There are several ways to demonstrate the change, this has been the easiest for me: 1. Install spider <http://bclary.com/projects/spider/spider/spider.xpi> 2. From a normal browser window, open venkman, disable exclude browser files and set /fbreak spider.js 41 /fbreak spider.js 83 3. paste chrome://spider/content/spider.xul into the url bar 4. at the break points, inspect evt.eventPhase In 1.8.x builds and trunk builds prior to 2006-06-16 you will see at line 41: CAPTURING_PHASE then AT_TARGET at line 83: AT_TARGET in trunk builds on or after 2006-06-16 you will only see CAPTURING_PHASE. I can probably work around this if this change is intentional, but if it is not I would prefer to get this fixed as it _blocks all test automation on the trunk which uses Spider_.
Assignee: events → Olli.Pettay
Blocks: 339659
Attached patch proposed patchSplinter Review
this is a regression from Bug 339659. I forgot that some events which are dispatched to |window| don't actually have |window| as the originalTarget.
Attachment #226145 - Flags: superreview?(bugmail)
Attachment #226145 - Flags: review?(bugmail)
Attached file testcase
On branches this alerts AT_TARGET, on trunk CAPTURING
(In reply to comment #1) > Created an attachment (id=226145) [edit] > proposed patch This fixes the problem for me on winxp.
Comment on attachment 226145 [details] [diff] [review] proposed patch r/sr=sicking
Attachment #226145 - Flags: superreview?(bugmail)
Attachment #226145 - Flags: superreview+
Attachment #226145 - Flags: review?(bugmail)
Attachment #226145 - Flags: review+
Comment on attachment 226145 [details] [diff] [review] proposed patch But make a note in bug 235441 as well, rather than just leaving it in the code.
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
verified fixed on windows trunk opt build. Thanks!
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: