onfocus DOM events are not inherited (bubble up)

RESOLVED INVALID

Status

()

RESOLVED INVALID
11 years ago
11 years ago

People

(Reporter: mrj, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9) Gecko/2008052912 Firefox/3.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9) Gecko/2008052912 Firefox/3.0

onfocus DOM events are not inherited (bubble up).

Reproducible: Always

Steps to Reproduce:
1.Load http://mrj.bpa.nu/f.html
2.Click in top box
3.Click in bottom box
Actual Results:  
An 'x' is only added to the status bar when the bottom box is given focus.

Expected Results:  
An 'x' should be added to the status bar when either box is given focus.

HTML to reproduce:

<div onfocus="window.status += 'x'"> 
<input type="text"/>
</div>

<input type="text" onfocus="window.status += 'x'"/>

Comment 1

11 years ago
http://www.w3.org/TR/DOM-Level-3-Events/events.html#event-focus specifies that this event must not bubble.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

11 years ago
OK, thanks Aiko.

Some code that worked in FF2 does not work in FF3, so it's FF2 that's out of spec.

Comment 3

11 years ago
Did you really test this with text inputs? If not you were probably seeing bug 238987 in Fx 2.
(Reporter)

Comment 4

11 years ago
It looks like it was indeed #238987, because I only get the bubble on a select under FF 2.0.0.14.

I failed to find this bug in my searches prior to submission, and failed to narrow down the unexpected behaviour.

Thanks for setting me straight.
You need to log in before you can comment on or make changes to this bug.