You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2015/09/16 13:34:43 UTC

tapestry-5 git commit: TAP5-2503: don't simply procees with the action when right-clicking a link with the confirm mixin

Repository: tapestry-5
Updated Branches:
  refs/heads/master 666791089 -> 698d2418f


TAP5-2503: don't simply procees with the action when right-clicking a link with the confirm mixin


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/698d2418
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/698d2418
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/698d2418

Branch: refs/heads/master
Commit: 698d2418f6c194b0300b9c678d219bd815e1e3c4
Parents: 6667910
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Wed Sep 16 13:33:41 2015 +0200
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Wed Sep 16 13:33:41 2015 +0200

----------------------------------------------------------------------
 .../META-INF/modules/t5/core/confirm-click.coffee            | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/698d2418/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 45652f2..17764c9 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
@@ -1,6 +1,6 @@
 # ## t5/core/confirm-click
 #
-# Support for the Tapestry Confirm mixin, and for running confirmation dialogs programatically.
+# Support for the Tapestry Confirm mixin, and for running confirmation dialogs programmatically.
 # Note that this does not function correctly when Prototype is present.
 
 define ["jquery", "./events", "./dom", "bootstrap/modal"],
@@ -57,7 +57,7 @@ define ["jquery", "./events", "./dom", "bootstrap/modal"],
         $dialog.find(".modal-footer .btn").first().focus()
 
     # Support for the Confirm mixin
-    $("body").on "click", "[data-confirm-message]:not(.disabled)", ->
+    $("body").on "click", "[data-confirm-message]:not(.disabled)", (event)->
 
       $this = $(this)
 
@@ -82,9 +82,9 @@ define ["jquery", "./events", "./dom", "bootstrap/modal"],
       # Cancel the original click event
       return false
 
-    dom.onDocument "click", "a[data-confirm-message]:not(.disabled)", ->
+    ($ document.body).on "click", "a[data-confirm-message]:not(.disabled)", ->
 
-      # Order of event handlers on an element is not predicatable. From testing, I found this could happen.
+      # 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"