Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for issue #3815 - vclick events don't have pageX/pageY defined on…

… them

- Modified createVirtualEvent() so that it uses the mouseHook properties if the original event type starts with "mouse" or "click". The original regex was only looking for "mouse".
  • Loading branch information...
commit 9856ba36805dcc3b2decddf02e2da969c5bc815c 1 parent e88fd48
@jblas jblas authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  js/jquery.mobile.vmouse.js
View
2  js/jquery.mobile.vmouse.js
@@ -68,7 +68,7 @@ function createVirtualEvent( event, eventType ) {
// addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
// https://github.com/jquery/jquery-mobile/issues/3280
- if ( t.search(/mouse/) >-1 ) {
+ if ( t.search( /^(mouse|click)/ ) > -1 ) {
props = mouseEventProps;
}

2 comments on commit 9856ba3

@staabm

Should this regex be cached?

@jblas

@staabm

Yeah, it probably should given the fact that it could be triggered quite frequently for touchmove/mousemove events. I think there's another regex in that same function looking for touch events too.

Please sign in to comment.
Something went wrong with that request. Please try again.