Discussion:
[HtmlUnit] [ htmlunit-Bugs-1976960 ] HrmlAnchor onClick breaks with event bubbling
SourceForge.net
2008-05-28 17:25:01 UTC
Permalink
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
SourceForge.net
2008-05-28 19:39:09 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 12:25
Message generated for change (Comment added) made by snowbot3
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

----------------------------------------------------------------------
Comment By: chris frost (snowbot3)
Date: 2008-05-28 14:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-02 17:51:31 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 13:25
Message generated for change (Comment added) made by sdanig
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: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 13:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 15:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-02 20:47:29 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 12:25
Message generated for change (Comment added) made by snowbot3
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: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Comment By: chris frost (snowbot3)
Date: 2008-06-02 15:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 12:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 14:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-03 21:07:36 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 13:25
Message generated for change (Comment added) made by sdanig
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: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 17:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 16:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 13:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 15:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-04 17:13:51 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 13:25
Message generated for change (Settings changed) made by sdanig
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: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 17:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 16:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 13:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 15:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-05 16:14:37 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 12:25
Message generated for change (Comment added) made by snowbot3
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
Post by SourceForge.net
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Post by SourceForge.net
Comment By: chris frost (snowbot3)
Date: 2008-06-05 11:14

Message:
Logged In: YES
user_id=2013043
Originator: YES

I build htmlunit locally and tried it and it seems to work, but my test
that made me knowtist it originally is still failing. I am trying to
determine why my original test is failing so give a little more time to
determine that this is not its problem anymore. Thank you Lot.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 16:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 15:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 12:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 14:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-07 23:43:41 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 13:25
Message generated for change (Comment added) made by sdanig
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: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Comment By: Daniel Gredler (sdanig)
Date: 2008-06-07 19:43

Message:
Logged In: YES
user_id=1109422
Originator: NO

Pending user feedback.

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-05 12:14

Message:
Logged In: YES
user_id=2013043
Originator: YES

I build htmlunit locally and tried it and it seems to work, but my test
that made me knowtist it originally is still failing. I am trying to
determine why my original test is failing so give a little more time to
determine that this is not its problem anymore. Thank you Lot.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 17:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 16:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 13:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 15:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-10 14:48:03 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 12:25
Message generated for change (Settings changed) made by snowbot3
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
Post by SourceForge.net
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Post by SourceForge.net
Comment By: chris frost (snowbot3)
Date: 2008-06-10 09:48

Message:
Logged In: YES
user_id=2013043
Originator: YES

Ok. I did not add the jar correctly on my original test, but after I did
it worked greate. I have not found any other problems with Event bubbling
so I think it is good. I went ahead and checked ie6 using a vitural
machine, and it works the same as ie7. Figured I would check it so ya
know. Thank you lots.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-07 18:43

Message:
Logged In: YES
user_id=1109422
Originator: NO

Pending user feedback.

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-05 11:14

Message:
Logged In: YES
user_id=2013043
Originator: YES

I build htmlunit locally and tried it and it seems to work, but my test
that made me knowtist it originally is still failing. I am trying to
determine why my original test is failing so give a little more time to
determine that this is not its problem anymore. Thank you Lot.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 16:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 15:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 12:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 14:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
SourceForge.net
2008-06-10 16:54:12 UTC
Permalink
Bugs item #1976960, was opened at 2008-05-28 13:25
Message generated for change (Comment added) made by sdanig
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: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: chris frost (snowbot3)
Assigned to: Daniel Gredler (sdanig)
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

----------------------------------------------------------------------
Comment By: Daniel Gredler (sdanig)
Date: 2008-06-10 12:54

Message:
Logged In: YES
user_id=1109422
Originator: NO

Good to hear. Thanks for the bug report!

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-10 10:48

Message:
Logged In: YES
user_id=2013043
Originator: YES

Ok. I did not add the jar correctly on my original test, but after I did
it worked greate. I have not found any other problems with Event bubbling
so I think it is good. I went ahead and checked ie6 using a vitural
machine, and it works the same as ie7. Figured I would check it so ya
know. Thank you lots.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-07 19:43

Message:
Logged In: YES
user_id=1109422
Originator: NO

Pending user feedback.

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-05 12:14

Message:
Logged In: YES
user_id=2013043
Originator: YES

I build htmlunit locally and tried it and it seems to work, but my test
that made me knowtist it originally is still failing. I am trying to
determine why my original test is failing so give a little more time to
determine that this is not its problem anymore. Thank you Lot.

----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-03 17:07

Message:
Logged In: YES
user_id=1109422
Originator: NO

OK, so I think this is fixed in SVN. Not sure if you're building locally
or downloading the latest snapshots
(http://build.canoo.com/htmlunit/artifacts/), but can you give it a whirl
and verify it on your side? If you are building locally, you can also have
a look at the unit test I added for this bug, derived from your patch
(EventTest#testEventBubblingReturns()).

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-06-02 16:47

Message:
Logged In: YES
user_id=2013043
Originator: YES

IE is a little weird about events on parents, so I am glad you asked
this.
With IE7 the last return statement overwrites any previews. In my case,
none
of the parents have returns so the only return is the return false on my a
tag.
As for FF, I am checking with FF2 as well, and if any return false, than
it stops.
I made a little chart incase you need more.

Test Chart
Return On Link Tag, Return On Any Parent, FF2 Result, IE7 Result
return false, no return, stops pagination, stops pagination * this is the
one I care about
return false, return true, stops pagination, paginates
return true, no return, paginates, paginates
return true, return false, stops pagination, stops pagination
no return, no return, paginates, paginates
no return, returns true, paginates, paginates
no return, returns false, stops pagination, stops pagination


----------------------------------------------------------------------

Comment By: Daniel Gredler (sdanig)
Date: 2008-06-02 13:51

Message:
Logged In: YES
user_id=1109422
Originator: NO

Based on my brief testing, it appears that the current behavior (only
watch the highest parent's return value) is actually valid for IE, but your
proposed behavior (watch all the parent's return values) is valid for FF.
Were you testing in FF? Can you verify my results in IE?

----------------------------------------------------------------------

Comment By: chris frost (snowbot3)
Date: 2008-05-28 15:39

Message:
Logged In: YES
user_id=2013043
Originator: YES

File Added: HtmlAnchorTest.java.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1976960&group_id=47038
Loading...