{
+ acc[field.name] = field
+
+ return acc
+ }, {})
+ },
defaultFieldType () {
if (this.drawFieldType) {
return this.drawFieldType
@@ -154,7 +162,9 @@ export default {
}
},
isMobile () {
- return /android|iphone|ipad/i.test(navigator.userAgent)
+ const isMobileSafariIos = 'ontouchstart' in window && navigator.maxTouchPoints > 0 && /AppleWebKit/i.test(navigator.userAgent)
+
+ return isMobileSafariIos || /android|iphone|ipad/i.test(navigator.userAgent)
},
resizeDirectionClasses () {
return {
diff --git a/app/javascript/template_builder/preview.vue b/app/javascript/template_builder/preview.vue
index 29505141a..1934040b9 100644
--- a/app/javascript/template_builder/preview.vue
+++ b/app/javascript/template_builder/preview.vue
@@ -104,17 +104,17 @@
@update:model-value="onUpdateName"
/>
+