Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>pull/6/head
parent
2273be5afd
commit
a09611a580
@ -1,7 +0,0 @@
|
||||
import MobileDetect from 'mobile-detect';
|
||||
|
||||
export default function isMobile() {
|
||||
const mobileDetect = new MobileDetect(window.navigator.userAgent);
|
||||
|
||||
return mobileDetect.mobile() != null;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
import MobileDetect from 'mobile-detect';
|
||||
|
||||
const mobileDetect = new MobileDetect(window.navigator.userAgent);
|
||||
|
||||
export function isMobile() {
|
||||
|
||||
return mobileDetect.mobile() != null;
|
||||
}
|
||||
|
||||
export function isIOS() {
|
||||
return mobileDetect.is('iOS');
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
// Allow iOS devices to disable scrolling of the body/virtual table
|
||||
// when a modal is open. This will prevent focusing an input in a
|
||||
// modal causing the modal to close due to scrolling.
|
||||
|
||||
let scrollLock = false;
|
||||
|
||||
export function isLocked() {
|
||||
return scrollLock;
|
||||
}
|
||||
|
||||
export function setScrollLock(locked) {
|
||||
scrollLock = locked;
|
||||
}
|
Loading…
Reference in new issue