Fixes #12736. Move hover event hack to deprecated.js for removal in 1.9. Closes gh-982.

Signed-off-by: Timmy Willison <timmywillisn@gmail.com>
This commit is contained in:
Greg Lavallee
2012-10-16 14:36:47 -04:00
committed by Timmy Willison
parent fd5facf1d1
commit e83bc970f2
4 changed files with 79 additions and 49 deletions

View File

@@ -1,12 +1,8 @@
var rformElems = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
hoverHack = function( events ) {
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
};
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
/*
* Helper functions for managing events -- not part of the public interface.
@@ -56,7 +52,7 @@ jQuery.event = {
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
types = jQuery.trim( hoverHack(types) ).split( " " );
types = jQuery.trim( types ).split( " " );
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
@@ -139,7 +135,7 @@ jQuery.event = {
}
// Once for each type.namespace in types; type may be omitted
types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
types = jQuery.trim( types ).split(" ");
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = origType = tns[1];