Last Comment Bug 105280 - preventBubble(), preventCapture() should be remvoed
: preventBubble(), preventCapture() should be remvoed
: testcase
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: x86 Windows 98
P5 normal (vote)
: Future
Assigned To: events
: Hixie (not reading bugmail)
: Andrew Overholt [:overholt]
: 105310 (view as bug list)
Depends on: 234455 330710
  Show dependency treegraph
Reported: 2001-10-17 13:23 PDT by Alex Vincent [:WeirdAl]
Modified: 2006-05-02 10:10 PDT (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase showing event propagation (2.74 KB, text/html)
2001-10-17 13:24 PDT, Alex Vincent [:WeirdAl]
no flags Details

Description User image Alex Vincent [:WeirdAl] 2001-10-17 13:23:15 PDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5) Gecko/20011011
BuildID:    Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.5) Gecko/20011011

The preventBubble() method, when executing during the capturing phase of an
Event object, does not currently allow said Event object to reach its target. 
It stops the event at the object which the listener is attached to.

Reproducible: Always
Steps to Reproduce:
1.  Open the testcase and bonk on the button.

Actual Results:  Two objects capture the Event object:  the window and the
document body element.  

Expected Results:  Three objects capture the Event object:  the window,
document.body, and document.forms[0].  The input element, being the target, also
should receive it.

Testcase attachment in one moment.
Comment 1 User image Alex Vincent [:WeirdAl] 2001-10-17 13:24:10 PDT
Created attachment 53952 [details]
testcase showing event propagation
Comment 2 User image joki (gone) 2001-10-24 23:39:00 PDT
You are very correct but preventBubble is not, in fact, a standard method.  It
was in an early draft but was replaced with stopPropagation(), which is the
effect you're seeing.  Rather than fixing this what needs to be done is that
preventBubble/preventCapture both need to be removed.  Updating bug to that effect.
Comment 3 User image joki (gone) 2001-10-24 23:56:25 PDT
*** Bug 105310 has been marked as a duplicate of this bug. ***
Comment 4 User image Boris Zbarsky [:bz] (still a bit busy) 2004-05-10 00:14:32 PDT
Is this still the plan?  jst?  bryner?

We have a bunch of code using these methods; it'd need to migrate to
Comment 5 User image 2004-05-10 03:25:59 PDT
Is this reference still pertinent?
Comment 6 User image Olli Pettay [:smaug] (pto-ish for couple of days) 2006-05-02 10:10:38 PDT
preventBubble and preventCapture are now no-ops, see bug 330494.

Note You need to log in before you can comment on or make changes to this bug.