From a57975fb74d6abfc9479ad06d2b524866ac5a7d8 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Tue, 22 Dec 2015 15:19:13 +0300 Subject: Revert "Event: remove deprecated event aliases" This reverts commit ef30bdf4f1b361b6f2e99f5b7233b419f95a62f2. --- src/event/alias.js | 4 ++-- test/unit/event.js | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/event/alias.js b/src/event/alias.js index 75467353c..e94dc8c3a 100644 --- a/src/event/alias.js +++ b/src/event/alias.js @@ -3,9 +3,9 @@ define( [ "../event" ], function( jQuery ) { -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup contextmenu" ).split( " " ), + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding diff --git a/test/unit/event.js b/test/unit/event.js index 274cf41b5..e8201f93c 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -906,7 +906,7 @@ QUnit.test( "mouseenter, mouseleave don't catch exceptions", function( assert ) if ( jQuery.fn.click ) { QUnit.test( "trigger() shortcuts", function( assert ) { - assert.expect( 5 ); + assert.expect( 6 ); var counter, clickCounter, elem = jQuery( "
  • Change location
  • " ).prependTo( "#firstUL" ); @@ -938,6 +938,13 @@ if ( jQuery.fn.click ) { jQuery( "#simon1" ).click(); assert.equal( clickCounter, 1, "Check that click, triggers onclick event handler on an a tag also" ); + elem = jQuery("").load(function(){ + ok( true, "Trigger the load event, using the shortcut .load() (#2819)"); + }).load(); + + // manually clean up detached elements + elem.remove(); + // test that special handlers do not blow up with VML elements (#7071) jQuery( "" ).appendTo( "head" ); jQuery( " " ).appendTo( "#form" ); -- cgit v1.2.3