File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
var rformElems = / ^ (?: t e x t a r e a | i n p u t | s e l e c t ) $ / i,
4
4
rtypenamespace = / ^ ( [ ^ \. ] * ) ? (?: \. ( .+ ) ) ? $ / ,
5
- rhoverHack = / \b h o v e r ( \. \S + ) ? \b / ,
5
+ rhoverHack = / (?: ^ | \s ) h o v e r ( \. \S + ) ? \b / ,
6
6
rkeyEvent = / ^ k e y / ,
7
7
rmouseEvent = / ^ (?: m o u s e | c o n t e x t m e n u ) | c l i c k / ,
8
8
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 ) $ / ,
Original file line number Diff line number Diff line change @@ -787,7 +787,7 @@ test("unbind(eventObject)", function() {
787
787
} ) ;
788
788
789
789
test ( "hover() and hover pseudo-event" , function ( ) {
790
- expect ( 2 ) ;
790
+ expect ( 3 ) ;
791
791
792
792
var times = 0 ,
793
793
handler1 = function ( event ) { ++ times ; } ,
@@ -810,6 +810,9 @@ test("hover() and hover pseudo-event", function() {
810
810
. on ( "hovercraft" , function ( ) {
811
811
ok ( false , "hovercraft is full of ills" ) ;
812
812
} )
813
+ . on ( "click.hover.me.not" , function ( e ) {
814
+ equal ( e . handleObj . namespace , "hover.me.not" , "hover hack doesn't mangle namespaces" ) ;
815
+ } )
813
816
. bind ( "hover" , function ( e ) {
814
817
if ( e . type === "mouseenter" ) {
815
818
balance ++ ;
@@ -819,6 +822,7 @@ test("hover() and hover pseudo-event", function() {
819
822
ok ( false , "hover pseudo: unknown event type " + e . type ) ;
820
823
}
821
824
} )
825
+ . trigger ( "click" )
822
826
. trigger ( "mouseenter" )
823
827
. trigger ( "mouseleave" )
824
828
. unbind ( "hover" )
You can’t perform that action at this time.
0 commit comments