feat: disable auto-scroll on ios device

This commit is contained in:
Yifei Zhang
2023-03-19 14:04:16 +00:00
parent a2baad9c7f
commit caec01269a
2 changed files with 8 additions and 4 deletions

View File

@@ -29,4 +29,9 @@ export function downloadAs(text: string, filename: string) {
element.click();
document.body.removeChild(element);
}
export function isIOS() {
const userAgent = navigator.userAgent.toLowerCase();
return /iphone|ipad|ipod/.test(userAgent);
}