fix: prevent a bug for node views when pressing enter on iOS, fix #1214
This commit is contained in:
12
packages/core/src/utilities/isiOS.ts
Normal file
12
packages/core/src/utilities/isiOS.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export default function isiOS(): boolean {
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user