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

Commit 6e02375

Browse files
committed
Vmouse: Fix compatibility issues with jQuery 3.0
1 parent 2bcd3aa commit 6e02375

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/vmouse.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var dataPropertyName = "virtualMouseBindings",
4444
virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
4545
touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
4646
mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
47-
mouseEventProps = $.event.props.concat( mouseHookProps ),
47+
mouseEventProps = $.event.props ? $.event.props.concat( mouseHookProps ): mouseHookProps,
4848
activeDocHandlers = {},
4949
resetTimerID = 0,
5050
startX = 0,
@@ -83,7 +83,8 @@ function createVirtualEvent( event, eventType ) {
8383
event.type = eventType;
8484

8585
oe = event.originalEvent;
86-
props = $.event.props;
86+
props = ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
87+
"metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " );
8788

8889
// addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
8990
// https://github.com/jquery/jquery-mobile/issues/3280

0 commit comments

Comments
 (0)