aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/event.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-10-21 11:11:36 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-10-24 11:18:14 -0400
commitd28ab68699f57238b3479c5c0b9dae23968bb7b7 (patch)
tree87583a41863d98d99bc54db8ec2265fbe24ce936 /test/unit/event.js
parent9fabe2028f05bc409f937ff7cd71caaacd26f945 (diff)
downloadjquery-d28ab68699f57238b3479c5c0b9dae23968bb7b7.tar.gz
jquery-d28ab68699f57238b3479c5c0b9dae23968bb7b7.zip
Make event.currentTarget the delegate node, always.
This lets us use currentTarget for its intended use and avoids creating a non-standard delegateTarget property.
Diffstat (limited to 'test/unit/event.js')
-rw-r--r--test/unit/event.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index cce9061ed..905e6ab99 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -1476,7 +1476,7 @@ test(".live()/.die()", function() {
// Test this, target and currentTarget are correct
jQuery("span#liveSpan1").live("click", function(e){
equals( this.id, "liveSpan1", "Check the this within a live handler" );
- equals( e.currentTarget.id, "liveSpan1", "Check the event.currentTarget within a live handler" );
+ equals( e.currentTarget, document, "Check the event.currentTarget within a live handler" );
equals( e.target.nodeName.toUpperCase(), "A", "Check the event.target within a live handler" );
});
@@ -2008,7 +2008,7 @@ test(".delegate()/.undelegate()", function() {
// Test this, target and currentTarget are correct
jQuery("#body").delegate("span#liveSpan1", "click", function(e){
equals( this.id, "liveSpan1", "Check the this within a delegate handler" );
- equals( e.currentTarget.id, "liveSpan1", "Check the event.currentTarget within a delegate handler" );
+ equals( e.currentTarget, document.body, "Check the event.currentTarget within a delegate handler" );
equals( e.target.nodeName.toUpperCase(), "A", "Check the event.target within a delegate handler" );
});