File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11var rformElems = / ^ (?: t e x t a r e a | i n p u t | s e l e c t ) $ / i,
22 rtypenamespace = / ^ ( [ ^ \. ] * | ) (?: \. ( .+ ) | ) $ / ,
3+ reventTypes = / \S + / g,
34 rkeyEvent = / ^ k e y / ,
45 rmouseEvent = / ^ (?: m o u s e | c o n t e x t m e n u ) | c l i c k / ,
56 rfocusMorph = / ^ (?: f o c u s i n f o c u s | f o c u s o u t b l u r ) $ / ;
@@ -52,7 +53,7 @@ jQuery.event = {
5253
5354 // Handle multiple events separated by a space
5455 // jQuery(...).bind("mouseover mouseout", fn);
55- types = jQuery . trim ( types ) . split ( " " ) ;
56+ types = ( types || "" ) . match ( reventTypes ) || [ "" ] ;
5657 for ( t = 0 ; t < types . length ; t ++ ) {
5758
5859 tns = rtypenamespace . exec ( types [ t ] ) || [ ] ;
@@ -135,7 +136,7 @@ jQuery.event = {
135136 }
136137
137138 // Once for each type.namespace in types; type may be omitted
138- types = jQuery . trim ( types ) . split ( " " ) ;
139+ types = ( types || "" ) . match ( reventTypes ) || [ "" ] ;
139140 for ( t = 0 ; t < types . length ; t ++ ) {
140141 tns = rtypenamespace . exec ( types [ t ] ) || [ ] ;
141142 type = origType = tns [ 1 ] ;
Original file line number Diff line number Diff line change @@ -2650,7 +2650,7 @@ test(".on and .off", function() {
26502650 counter += ( e . data || 0 ) + ( trig || 1 ) ;
26512651 } ;
26522652 jQuery ( "#onandoff" )
2653- . on ( "click clack cluck" , "em" , 2 , mixfn )
2653+ . on ( " click clack cluck " , "em" , 2 , mixfn )
26542654 . on ( "cluck" , "b" , 7 , mixfn )
26552655 . on ( "cluck" , mixfn )
26562656 . trigger ( "what!" )
You can’t perform that action at this time.
0 commit comments