Skip to content

Commit

Permalink
SUPPORT_POINTER_EVENTS false
Browse files Browse the repository at this point in the history
  • Loading branch information
Henk Kelder committed Oct 9, 2019
1 parent c5cd73a commit a57f703
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions hammer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var TOUCH_ACTION_MAP = getTouchActionProps();
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;

var SUPPORT_TOUCH = 'ontouchstart' in window;
var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);

var INPUT_TYPE_TOUCH = 'touch';
Expand Down Expand Up @@ -2389,8 +2388,6 @@ function createInputInstance(manager) {

if (inputClass) {
Type = inputClass;
} else if (SUPPORT_POINTER_EVENTS) {
Type = PointerEventInput;
} else if (SUPPORT_ONLY_TOUCH) {
Type = TouchInput;
} else if (!SUPPORT_TOUCH) {
Expand Down
2 changes: 1 addition & 1 deletion hammer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hammer.min.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/inputjs/input-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import prefixed from '../utils/prefixed';
const MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;

const SUPPORT_TOUCH = ('ontouchstart' in window);
const SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
// const SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
// for IOS 13 fix
const SUPPORT_POINTER_EVENTS = false;
const SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);

const INPUT_TYPE_TOUCH = 'touch';
Expand Down

0 comments on commit a57f703

Please sign in to comment.