SourceForge.net
2008-05-28 17:25:01 UTC
Bugs item #1976960, was opened at 2008-05-28 12:25
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Latest code in SVN
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Nobody/Anonymous (nobody)
Summary: HrmlAnchor onClick breaks with event bubbling
Initial Comment:
When an anchor has parents with onclick functions as well, than the eventbubble only cares about the highest parent. If that parent returns true, or has no return, the link is still followed even if the anchor returns false.
The event bubble should stop the link if any of the tags involved return false, not just the highest parent.
Attached patch with test to show how it should work. This patch should be applied to /htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Latest code in SVN
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Nobody/Anonymous (nobody)
Summary: HrmlAnchor onClick breaks with event bubbling
Initial Comment:
When an anchor has parents with onclick functions as well, than the eventbubble only cares about the highest parent. If that parent returns true, or has no return, the link is still followed even if the anchor returns false.
The event bubble should stop the link if any of the tags involved return false, not just the highest parent.
Attached patch with test to show how it should work. This patch should be applied to /htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlAnchorTest.java
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038