-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tooltip): stop showing tootip for touch based devices #131
fix(tooltip): stop showing tootip for touch based devices #131
Conversation
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good thanks!
}; | ||
}, | ||
|
||
computed: { | ||
// whether the tooltip is visible or not. | ||
isVisible () { | ||
return this.isShown && this.enabled && (!!this.message.trim() || !!this.$slots.default); | ||
return this.isShown && this.enabled && (!!this.message.trim() || !!this.$slots.default) && !this.isTouchDevice; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to improve this computed property, could be something like this?
isVisible() {
const hasMessage = !!this.message.trim();
const hasDefaultSlot = !!this.$slots.default;
const isDeviceCompatible = !this.isTouchDevice;
const shouldBeVisible = this.isShown && this.enabled && (hasMessage || hasDefaultSlot);
return shouldBeVisible && isDeviceCompatible;
},
I guess it will work as this way, double check it please to be sure, and make this update also in the vue3 version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks
✔️ Deploy previews ready! |
@ninamarina This issue is cuz @ninamarina @braddialpad Please let know if there is something more we can do fix it, otherwise it looks like a browser issue in chrome. refer: https://copyprogramming.com/howto/jquery-on-click-triggers-mouseover-on-touch-device |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
✔️ Deploy previews ready! |
## [3.107.2](dialtone-vue3/v3.107.1...dialtone-vue3/v3.107.2) (2024-02-07) ### Bug Fixes * **Tooltip:** stop showing tootip for touch based devices ([#131](#131)) ([0c1be19](0c1be19))
## [2.114.2](dialtone-vue2/v2.114.1...dialtone-vue2/v2.114.2) (2024-02-07) ### Bug Fixes * **Tooltip:** stop showing tootip for touch based devices ([#131](#131)) ([0c1be19](0c1be19))
## [9.11.6](dialtone/v9.11.5...dialtone/v9.11.6) (2024-02-07) ### Bug Fixes * **Tooltip:** stop showing tootip for touch based devices ([#131](#131)) ([0c1be19](0c1be19))
fix(tooltip): stop showing tootip for touch based devices
Obligatory GIF (super important!)
🛠️ Type Of Change
These types will increment the version number on release:
These types will not increment the version number, but will still deploy to documentation site on release:
📖 Jira Ticket
https://dialpad.atlassian.net/browse/DLT-1271
📖 Description
Hide the tooltip for touch based device.
💡 Context
Tooltip should not showup for touch based devices as there is no hover event, yet it is showing up when user clicks the anchor element which is not even hover.
📝 Checklist
For all PRs:
For all Vue changes:
./scripts/dialtone-vue-sync.sh
script.🔮 Next Steps
📷 Screenshots / GIFs
🔗 Sources