From a4e89473533d24fcd8d5f466086b1f28d646b9ed Mon Sep 17 00:00:00 2001 From: Dan Popescu Date: Wed, 23 Nov 2022 22:57:11 +0200 Subject: [PATCH] fix(QItem): improve click behavior on ios in non-desktop mode #13619 --- ui/src/components/item/QItem.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/components/item/QItem.js b/ui/src/components/item/QItem.js index fc2678bddf3..d72ae070f7a 100644 --- a/ui/src/components/item/QItem.js +++ b/ui/src/components/item/QItem.js @@ -73,6 +73,12 @@ export default Vue.extend({ } }, + needsIosWorkaround () { + const { is } = this.$q.platform + return this.linkTag === 'label' && is.ios === true && is.iosDesktop !== true && + (is.standalone === true || is.nativeMobile === true) + }, + onEvents () { return { ...this.qListeners, @@ -86,13 +92,14 @@ export default Vue.extend({ methods: { __onClick (e) { if (this.isClickable === true) { + this.needsIosWorkaround === true && this.$el.click() this.__refocus() this.__navigateOnClick(e) } }, __onFocus (e) { - this.isClickable === true && this.__refocus() + this.isClickable === true && this.needsIosWorkaround !== true && this.__refocus() this.qListeners.focus !== void 0 && this.$emit('focus', e) },