mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #11246 from Snuffleupagus/issue-11245
Tweak the `isIOS` check, in `web/viewer_compatibility`, to attempt to support newer Safari versions (issue 11245)
This commit is contained in:
commit
ecdf1375b8
1 changed files with 7 additions and 1 deletions
|
@ -17,8 +17,14 @@ let compatibilityParams = Object.create(null);
|
|||
if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) {
|
||||
const userAgent =
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent) || '';
|
||||
const platform =
|
||||
(typeof navigator !== 'undefined' && navigator.platform) || '';
|
||||
const maxTouchPoints =
|
||||
(typeof navigator !== 'undefined' && navigator.maxTouchPoints) || 1;
|
||||
|
||||
const isAndroid = /Android/.test(userAgent);
|
||||
const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
|
||||
const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) ||
|
||||
(platform === 'MacIntel' && maxTouchPoints > 1);
|
||||
|
||||
// Limit canvas size to 5 mega-pixels on mobile.
|
||||
// Support: Android, iOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue