Repository: tapestry-5 Updated Branches: refs/heads/master 698d2418f -> 73be2842a
TAP5-2305: fix Confirm mixin when using Prototype JS Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/73be2842 Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/73be2842 Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/73be2842 Branch: refs/heads/master Commit: 73be2842a31ecb616780b804b3a0ac8eecc1a365 Parents: 698d241 Author: Jochen Kemnade <[email protected]> Authored: Wed Sep 16 14:09:07 2015 +0200 Committer: Jochen Kemnade <[email protected]> Committed: Wed Sep 16 14:09:07 2015 +0200 ---------------------------------------------------------------------- .../META-INF/modules/t5/core/confirm-click.coffee | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/73be2842/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee ---------------------------------------------------------------------- diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee index 17764c9..235e0ad 100644 --- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee +++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/confirm-click.coffee @@ -82,15 +82,17 @@ define ["jquery", "./events", "./dom", "bootstrap/modal"], # Cancel the original click event return false - ($ document.body).on "click", "a[data-confirm-message]:not(.disabled)", -> + ($ document).on "click", "a[data-confirm-message]:not(.disabled)", (event) -> + + target = $ event.target # Order of event handlers on an element is not predictable. From testing, I found this could happen. # A bit ugly. - return if @attr "data-update-zone" + return if target.attr "data-update-zone" # See note above; this replicates the default behavior of a link element that is lost because # of the - window.location.href = @attr "href" + window.location.href = target.attr "href" return false # Exports:
