@@ -24,12 +24,12 @@ define([
24
24
if ( this . _targetElement ) {
25
25
return ; // already initialized
26
26
}
27
- if ( ! has ( "pointer" ) ) {
28
- if ( has ( "mspointer" ) ) {
27
+ if ( ! has ( "pointer-events " ) ) {
28
+ if ( has ( "mspointer-events " ) ) {
29
29
mspointer . registerHandlers ( targetElement ) ;
30
30
} else {
31
- if ( has ( "touch" ) ) {
32
- if ( ! has ( "mobile " ) ) {
31
+ if ( has ( "touch-events " ) ) {
32
+ if ( ! has ( "touch-device " ) ) {
33
33
mouse . registerHandlers ( targetElement ) ;
34
34
if ( has ( "chrome" ) ) {
35
35
touch . registerHandlers ( targetElement ) ;
@@ -83,10 +83,10 @@ define([
83
83
if ( ! this . _targetElement ) {
84
84
return false ; // not initialized
85
85
}
86
- if ( has ( "pointer" ) ) {
86
+ if ( has ( "pointer-events " ) ) {
87
87
return targetElement . setPointerCapture ( pointerId ) ; // use native Pointer Events method
88
88
} else {
89
- if ( has ( "mspointer" ) ) {
89
+ if ( has ( "mspointer-events " ) ) {
90
90
return targetElement . msSetPointerCapture ( pointerId ) ; // use native Pointer Events method
91
91
} else {
92
92
if ( pointerId === 1 ) { // mouse always gets ID = 1
@@ -108,10 +108,10 @@ define([
108
108
if ( ! this . _targetElement ) {
109
109
return false ;
110
110
}
111
- if ( has ( "pointer" ) ) {
111
+ if ( has ( "pointer-events " ) ) {
112
112
return targetElement . releasePointerCapture ( pointerId ) ;
113
113
} else {
114
- if ( has ( "mspointer" ) ) {
114
+ if ( has ( "mspointer-events " ) ) {
115
115
return targetElement . msReleasePointerCapture ( pointerId ) ;
116
116
} else {
117
117
if ( pointerId === 1 ) {
@@ -141,21 +141,21 @@ define([
141
141
}
142
142
143
143
// CSS rule when user agent implements W3C Pointer Events or when a polyfill is in place.
144
- if ( has ( "pointer" ) ) {
144
+ if ( has ( "pointer-events " ) ) {
145
145
insertTouchActionCSSRule ( "touch-action" ) ;
146
146
}
147
147
148
148
// CSS rule for IE10 and IE11 preview
149
- if ( has ( "mspointer" ) ) {
149
+ if ( has ( "mspointer-events " ) ) {
150
150
insertTouchActionCSSRule ( "-ms-touch-action" ) ;
151
151
}
152
152
// CSS rule to map CSS attribute in case user agent has native support for touch-action or -ms-touch-action
153
153
// CSS property.
154
- if ( has ( "touchAction " ) ) {
154
+ if ( has ( "css-touch-action " ) ) {
155
155
insertTouchActionCSSRule ( "touch-action" ) ;
156
156
} else {
157
157
// CSS rule for IE10 and IE11 preview
158
- if ( has ( "msTouchAction " ) ) {
158
+ if ( has ( "css-ms-touch-action " ) ) {
159
159
insertTouchActionCSSRule ( "-ms-touch-action" ) ;
160
160
}
161
161
}
@@ -180,7 +180,7 @@ define([
180
180
* @param e click event
181
181
*/
182
182
function clickHandler ( e ) {
183
- if ( has ( "touch" ) ) {
183
+ if ( has ( "touch-events " ) ) {
184
184
// (7) Android 4.1.1 generates a click after touchend even when touchstart is prevented.
185
185
// if we receive a native click at an element with touch action disabled we just have to absorb it.
186
186
// (fixed in Android 4.1.2+)
0 commit comments