]> source.dussan.org Git - jquery.git/commitdiff
Event: Treat Pointer events like mouse events, #14741
authorlouisremi <lrbabe@gmail.com>
Thu, 30 Jan 2014 15:07:06 +0000 (16:07 +0100)
committerDave Methvin <dave.methvin@gmail.com>
Sun, 16 Mar 2014 15:01:09 +0000 (11:01 -0400)
Ref #14741
Ref gh-1503
(cherry picked from commit e06f428f6ed99e0fafb2e21c456eafc570e3e5ba)

src/event.js

index a15cf6d45e940c9ad6f94ee3714d143fc69e0b66..f6e26d8b52ccf4ce64e0dac0936bac5b1b0f1667 100644 (file)
@@ -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 = /^([^.]*)(?:\.(.+)|)$/;
 
@@ -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,