From 4f9d41962a3f98206297679ff65d72b9ab3af214 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Fri, 6 May 2022 12:01:34 +0530 Subject: [PATCH] fix: Pre chat custom fields drag and drop (#4530) --- .../dashboard/components/ui/Switch.vue | 8 ++----- .../inbox/PreChatForm/PreChatFields.vue | 22 ++++++++++++++----- .../settings/inbox/PreChatForm/Settings.vue | 13 +++++++---- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/app/javascript/dashboard/components/ui/Switch.vue b/app/javascript/dashboard/components/ui/Switch.vue index 7dc4bcbfb..b0bc32881 100644 --- a/app/javascript/dashboard/components/ui/Switch.vue +++ b/app/javascript/dashboard/components/ui/Switch.vue @@ -17,12 +17,8 @@ export default { value: { type: Boolean, default: false }, }, methods: { - onClick(event) { - if (event.pointerId === -1) { - event.preventDefault(); - } else { - this.$emit('input', !this.value); - } + onClick() { + this.$emit('input', !this.value); }, }, }; diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue index 9d2691036..b1df3902a 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/PreChatForm/PreChatFields.vue @@ -1,6 +1,6 @@