Skip to content

Commit

Permalink
Event: Treat Pointer events like mouse events, #14741
Browse files Browse the repository at this point in the history
Ref #14741
Ref jquerygh-1503
(cherry picked from commit e06f428)
  • Loading branch information
louisremi authored and dmethvin committed Mar 16, 2014
1 parent 68edce3 commit 496d89b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define([

var rformElems = /^(?:input|select|textarea)$/i,
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/,
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;

Expand Down Expand Up @@ -766,7 +766,9 @@ jQuery.Event.prototype = {
// Create mouseenter/leave events using mouseover/out and event-time checks
jQuery.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function( orig, fix ) {
jQuery.event.special[ orig ] = {
delegateType: fix,
Expand Down

0 comments on commit 496d89b

Please sign in to comment.