Permalink
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...
jblas committed Mar 14, 2012
1 parent e88fd48 commit 9856ba36805dcc3b2decddf02e2da969c5bc815c
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

This comment has been minimized.

Show comment
Hide comment
@staabm

staabm Mar 14, 2012

Contributor

Should this regex be cached?

Contributor

staabm replied Mar 14, 2012

Should this regex be cached?

@jblas

This comment has been minimized.

Show comment
Hide comment
@jblas

jblas Mar 14, 2012

Contributor

@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.

Contributor

jblas replied Mar 14, 2012

@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.