Skip to content

Commit

Permalink
Fix iOS sniffing to include iPadOS 13+.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasramo committed Aug 12, 2020
1 parent a3d9e06 commit 8ae3445
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion dist/muuri.js
Original file line number Diff line number Diff line change
Expand Up @@ -2738,7 +2738,9 @@
}
}

var IS_IOS = /iPad|iPhone|iPod/.test(window.navigator.platform);
var IS_IOS =
/^(iPad|iPhone|iPod)/.test(window.navigator.platform) ||
(/^Mac/.test(window.navigator.platform) && window.navigator.maxTouchPoints > 1);
var START_PREDICATE_INACTIVE = 0;
var START_PREDICATE_PENDING = 1;
var START_PREDICATE_RESOLVED = 2;
Expand Down
2 changes: 1 addition & 1 deletion dist/muuri.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/muuri.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2732,7 +2732,9 @@ function removeClass(element, className) {
}
}

var IS_IOS = /iPad|iPhone|iPod/.test(window.navigator.platform);
var IS_IOS =
/^(iPad|iPhone|iPod)/.test(window.navigator.platform) ||
(/^Mac/.test(window.navigator.platform) && window.navigator.maxTouchPoints > 1);
var START_PREDICATE_INACTIVE = 0;
var START_PREDICATE_PENDING = 1;
var START_PREDICATE_RESOLVED = 2;
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"prosthetic-hand": "^1.3.1",
"qunit": "^2.10.1",
"rimraf": "^3.0.2",
"rollup": "^2.23.0",
"rollup": "^2.23.1",
"terser": "^5.0.0",
"web-animations-js": "^2.3.2"
}
Expand Down
4 changes: 3 additions & 1 deletion src/Item/ItemDrag.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ import isFunction from '../utils/isFunction';
import normalizeArrayIndex from '../utils/normalizeArrayIndex';
import removeClass from '../utils/removeClass';

var IS_IOS = /iPad|iPhone|iPod/.test(window.navigator.platform);
var IS_IOS =
/^(iPad|iPhone|iPod)/.test(window.navigator.platform) ||
(/^Mac/.test(window.navigator.platform) && window.navigator.maxTouchPoints > 1);
var START_PREDICATE_INACTIVE = 0;
var START_PREDICATE_PENDING = 1;
var START_PREDICATE_RESOLVED = 2;
Expand Down

0 comments on commit 8ae3445

Please sign in to comment.