mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 14:04:58 -05:00
Fix #11621, $(document).trigger() must bubble to window.
This commit is contained in:
@@ -928,7 +928,7 @@ test("trigger() shortcuts", function() {
|
||||
});
|
||||
|
||||
test("trigger() bubbling", function() {
|
||||
expect(17);
|
||||
expect(18);
|
||||
|
||||
var win = 0, doc = 0, html = 0, body = 0, main = 0, ap = 0;
|
||||
|
||||
@@ -964,6 +964,9 @@ test("trigger() bubbling", function() {
|
||||
equal( main, 1, "ap bubble" );
|
||||
equal( ap, 1, "ap bubble" );
|
||||
|
||||
jQuery( document ).trigger("click");
|
||||
equal( win, 4, "doc bubble" );
|
||||
|
||||
// manually clean up events from elements outside the fixture
|
||||
jQuery(document).unbind("click");
|
||||
jQuery("html, body, #qunit-fixture").unbind("click");
|
||||
|
||||
Reference in New Issue
Block a user