fix: can't edit on iOS

This commit is contained in:
Tienson Qin
2021-03-31 16:30:17 +08:00
parent 8ce2dfc55f
commit b2b5acb6f1
3 changed files with 26 additions and 12 deletions

View File

@@ -204,3 +204,16 @@ export const win32 = path => {
// UNC paths are always absolute
return Boolean(result[2] || isUnc);
};
export const ios = function () {
return [
'iPad Simulator',
'iPhone Simulator',
'iPod Simulator',
'iPad',
'iPhone',
'iPod'
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document)
}