Skip to content

Commit

Permalink
fix(QItem): improve click behavior on ios in non-desktop mode quasarf…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Mar 31, 2023
1 parent 7a045ab commit cb5cc05
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui/src/components/item/QItem.js
Expand Up @@ -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,
Expand All @@ -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)
},

Expand Down

0 comments on commit cb5cc05

Please sign in to comment.