File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ define([
14
14
15
15
var
16
16
rkeyEvent = / ^ k e y / ,
17
- rmouseEvent = / ^ (?: m o u s e | p o i n t e r | c o n t e x t m e n u ) | c l i c k / ,
17
+ rmouseEvent = / ^ (?: m o u s e | p o i n t e r | c o n t e x t m e n u | d r a g ) | c l i c k / ,
18
18
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 ) $ / ,
19
19
rtypenamespace = / ^ ( [ ^ . ] * ) (?: \. ( .+ ) | ) / ;
20
20
Original file line number Diff line number Diff line change @@ -2444,6 +2444,20 @@ test("fixHooks extensions", function() {
2444
2444
jQuery . event . fixHooks . click = saved ;
2445
2445
} ) ;
2446
2446
2447
+ test ( "drag events copy over mouse related event properties (gh-1925)" , function ( ) {
2448
+ expect ( 2 ) ;
2449
+
2450
+ var $fixture = jQuery ( "<div id='drag-fixture'></div>" ) . appendTo ( "body" ) ;
2451
+
2452
+ $fixture . on ( "dragmove" , function ( evt ) {
2453
+ ok ( "pageX" in evt , "checking for pageX property" ) ;
2454
+ ok ( "pageY" in evt , "checking for pageY property" ) ;
2455
+ } ) ;
2456
+
2457
+ fireNative ( $fixture [ 0 ] , "dragmove" ) ;
2458
+ $fixture . unbind ( "dragmove" ) . remove ( ) ;
2459
+ } ) ;
2460
+
2447
2461
test ( "focusin using non-element targets" , function ( ) {
2448
2462
expect ( 2 ) ;
2449
2463
You can’t perform that action at this time.
0 commit comments