Closed Bug 50478 Opened 24 years ago Closed 24 years ago

Key events bubble, but report "bubbles=false"

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: taras.tielkes, Assigned: hjtoi-bugzilla)

Details

(Whiteboard: [nsbeta3+])

On both Windows and Linux, the "onkeydown" event has the "bubbles" property set 
to false, but bubbling works nontheless. The stopPropagation() method on the 
event object also has the expected effect.
Nominating for nsbeta3. I am assuming the fix would be simple.
Keywords: correctness, nsbeta3
Re-assigning to Heikki and marking nsbeta3+
Assignee: joki → heikki
Whiteboard: [nsbeta3+]
Hmm. On further inspection it seems both bubbles and cancelable property return 
wrong values. It also looks like the implementation of GetBubbles and 
GetCancelable are implemented wrong:

250 nsDOMEvent::GetBubbles(PRBool* aBubbles)
251 {
252   *aBubbles = mEvent->flags & NS_EVENT_FLAG_CANT_BUBBLE;
253   return NS_OK;

Today is Monday, but it seem to me that line 252 should read:

   *aBubbles = !(mEvent->flags & NS_EVENT_FLAG_CANT_BUBBLE);
Status: NEW → ASSIGNED
Since P3 bugs will no longer be fixed, I am proposing a partial fix for this and 
then futuring. The partial fix is to correct the implementation of GetBubbles 
and GetCancelable. This basically reverses what the bubbles and cancelable 
propertie report now, but it reflects how we really deal with the events. It 
would be a much bigger job to set the bubbles & cancelable properties correctly 
for all events. Right now pretty much everything bubbles, regardless of the 
specs.
Marking relnote. See related bug 53118 for information about a known bug in
which Gecko bubbles events that should not be bubbled.

We will minus this bug once Heikki checks in his partial one-liner fix.
Keywords: relnote
Whiteboard: [nsbeta3+] → [nsbeta3+][Have partial fix]
Actually, this is now fixed because GetBubbles was fixed. This is more because 
of an accident - all of our events bubble. The only exception I know of right 
now is the load event when it is caused by image load. 

Bug 53118 is about events that bubble even though they shouldn't.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Keywords: relnote
Resolution: --- → FIXED
Whiteboard: [nsbeta3+][Have partial fix] → [nsbeta3+]
Updating QA Contact.
QA Contact: janc → lorca
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
QA contact updated
QA Contact: gerardok → madhur
verified on build 2001-08-07-08-trunk
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.