mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
Event: Treat Pointer events like mouse events, #14741
Ref #14741
Ref gh-1503
(cherry picked from commit e06f428f6e
)
This commit is contained in:
parent
f25a5b43d9
commit
64d7c168c8
@ -13,7 +13,7 @@ define([
|
|||||||
|
|
||||||
var rformElems = /^(?:input|select|textarea)$/i,
|
var rformElems = /^(?:input|select|textarea)$/i,
|
||||||
rkeyEvent = /^key/,
|
rkeyEvent = /^key/,
|
||||||
rmouseEvent = /^(?:mouse|contextmenu)|click/,
|
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
|
||||||
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
||||||
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
|
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
|
||||||
|
|
||||||
@ -766,7 +766,9 @@ jQuery.Event.prototype = {
|
|||||||
// Create mouseenter/leave events using mouseover/out and event-time checks
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
||||||
jQuery.each({
|
jQuery.each({
|
||||||
mouseenter: "mouseover",
|
mouseenter: "mouseover",
|
||||||
mouseleave: "mouseout"
|
mouseleave: "mouseout",
|
||||||
|
pointerenter: "pointerover",
|
||||||
|
pointerleave: "pointerout"
|
||||||
}, function( orig, fix ) {
|
}, function( orig, fix ) {
|
||||||
jQuery.event.special[ orig ] = {
|
jQuery.event.special[ orig ] = {
|
||||||
delegateType: fix,
|
delegateType: fix,
|
||||||
|
Loading…
Reference in New Issue
Block a user