[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    RFC: DOM/event bubbling
From:       Dirk Mueller <mueller () kde ! org>
Date:       2001-07-01 10:54:54
[Download RAW message or body]

Hi, 

given this testcase:

<html>
<body>
<form action="http://www.yahoo.com/" onsubmit="return false;">
<input type=hidden name="x" value="y">
<a href="http://www.web.de/"><input type=image src="pic.jpg"></a>
</form>
</html>


nothing should happen when you click on the "pic.jpg", at least thats
how IE and Netscape handle it. 

The missing part is that the cancelled onsubmit event should prevent the 
event bubbling of the click, and therefore the <a href> event handler
should not be called. 

DOM2 specifies stopPropagation() for that reason, but its unclear if it 
should be called on a preventDefault() occurence. 

So the question is, is this a special case that requires additional
attention or shouldn't we rather always do stopPropagation on a 
preventDefault() ?

DOM2 seems to be precisely unclear on this case. 


Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic