fix: prevent a bug for node views when pressing enter on iOS, fix #1214

This commit is contained in:
Philipp Kühn
2021-04-27 21:07:12 +02:00
parent fb3990d333
commit 234d23887b
2 changed files with 53 additions and 12 deletions

View 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)
}