Version: (using KDE KDE 3.3.0) Installed from: Gentoo Packages I filed this under bug 37442, but that's old and closed. So I'm making a new bug report: I'm using 3.3.0 and I can't get stopPropagation to work. My problem is this: I have a checkbox in a table cell, and when I check it, the cell's onclick event is fired, even if I try to cancel with stopPropagation. Description of the attached test case: There are two checkboxes. Check the first, and all the onclick events from the parentNodes are fired. Which is correct. Check the second and the same thing happens, even though it has "event.stopPropagation()" in its onclick. It works in Firefox 1.0pre.
Created an attachment (id=7778) [details] testcase
CVS commit by faure: Fixed stopPropagation when called from the target node itself CCMAIL: 90750-done@bugs.kde.org M +5 -0 ChangeLog 1.275.2.7 M +3 -3 xml/dom_nodeimpl.cpp 1.236.2.4 --- kdelibs/khtml/ChangeLog #1.275.2.6:1.275.2.7 @@ -1,2 +1,7 @@ +2004-10-11 David Faure <faure@kde.org> + + * xml/dom_nodeimpl.cpp (dispatchGenericEvent): Fixed stopPropagation + when called from the target node itself (#90750). + 2004-10-08 David Faure <faure@kde.org> --- kdelibs/khtml/xml/dom_nodeimpl.cpp #1.236.2.3:1.236.2.4 @@ -429,4 +429,5 @@ void NodeImpl::dispatchGenericEvent( Eve // dispatch to the actual target node it.toLast(); + NodeImpl* propagationSentinel = 0; if (!evt->propagationStopped()) { evt->setEventPhase(Event::AT_TARGET); @@ -435,11 +436,10 @@ void NodeImpl::dispatchGenericEvent( Eve if (!evt->propagationStopped()) it.current()->handleLocalEvents(evt,false); + else + propagationSentinel = it.current(); } --it; if (evt->bubbles()) { - evt->stopPropagation(false); - NodeImpl* propagationSentinel = 0; - evt->setEventPhase(Event::BUBBLING_PHASE); for (; it.current() && !evt->propagationStopped(); --it) {
Thanks a lot, I _really_ appreciate that!
You need to log in before you can comment on or make changes to this bug.