From f9affb550ac49424c745eb8116c419f5d1ab3278 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 11 Oct 2019 09:23:44 +0200 Subject: [PATCH] fix viewport overflow in iPadOS safari --- js/reveal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/reveal.js b/js/reveal.js index ef7ce494..9cb2f482 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -447,7 +447,8 @@ */ function checkCapabilities() { - isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ); + isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ) || + ( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA ); var testElement = document.createElement( 'div' );