Make sure that .data() events don't bubble, per the discussion in 2e10af143b. Fixes #6832.

This commit is contained in:
John Resig 2010-07-27 13:45:32 -04:00
parent 646fbea561
commit c4b4df4691
2 changed files with 14 additions and 3 deletions

View file

@ -70,7 +70,13 @@ test(".data()", function() {
test(".data(String) and .data(String, Object)", function() {
expect(27);
var div = jQuery("<div/>");
var parent = jQuery("<div><div></div></div>"),
div = parent.children();
parent
.bind("getData", function(){ ok( false, "getData bubbled." ) })
.bind("setData", function(){ ok( false, "setData bubbled." ) })
.bind("changeData", function(){ ok( false, "changeData bubbled." ) });
ok( div.data("test") === undefined, "Check for no data exists" );