Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 75b50f2

Browse files
committed
add mouse event props to virtual mouse events Fixes #3280
1 parent c7e1bf0 commit 75b50f2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/jquery.mobile.vmouse.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var dataPropertyName = "virtualMouseBindings",
2323
touchTargetPropertyName = "virtualTouchID",
2424
virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
2525
touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
26+
mouseEventProps = $.event.props.concat( $.event.mouseHooks.props ),
2627
activeDocHandlers = {},
2728
resetTimerID = 0,
2829
startX = 0,
@@ -61,6 +62,12 @@ function createVirtualEvent( event, eventType ) {
6162
oe = event.originalEvent;
6263
props = $.event.props;
6364

65+
// addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
66+
// https://github.com/jquery/jquery-mobile/issues/3280
67+
if ( t.search(/mouse/) >-1 ) {
68+
props = mouseEventProps;
69+
}
70+
6471
// copy original event properties over to the new event
6572
// this would happen if we could call $.event.fix instead of $.Event
6673
// but we don't have a way to force an event to be fixed multiple times

0 commit comments

Comments
 (0)