diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 00:14:57 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-01-16 00:14:57 -0500 |
commit | fc2ba2e1361126c39f955437ee025cfca3bffa65 (patch) | |
tree | b6f30ea65223bec9e7a400c054d6b0857e39f7c0 /test/unit/event.js | |
parent | 65df32dc21dc315fe0dcccdcf7d07884f4794ccd (diff) | |
download | jquery-fc2ba2e1361126c39f955437ee025cfca3bffa65.tar.gz jquery-fc2ba2e1361126c39f955437ee025cfca3bffa65.zip |
Fix #13208: only check elements for delegation matches
Diffstat (limited to 'test/unit/event.js')
-rw-r--r-- | test/unit/event.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 6984b4945..bde9f7f43 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1811,6 +1811,17 @@ test( "delegated event with selector matching Object.prototype property (#13203) equal( matched, 0, "Nothing matched 'toString'" ); }); +test( "delegated event with intermediate DOM manipulation (#13208)", function() { + expect(1); + + jQuery("#foo").on( "click", "#sap", function() {}); + jQuery("#sap").on( "click", "#anchor2", function() { + jQuery( this.parentNode ).remove(); + ok( true, "Element removed" ); + }); + jQuery("#anchor2").trigger("click"); +}); + test("stopPropagation() stops directly-bound events on delegated target", function() { expect(1); |