Skip to content
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

How to prevent tooltips from being created on mobile #95

Closed
ianpetzer opened this issue Sep 17, 2016 · 1 comment
Closed

How to prevent tooltips from being created on mobile #95

ianpetzer opened this issue Sep 17, 2016 · 1 comment

Comments

@ianpetzer
Copy link

Hi there,

I'm just upgrading from version 0.7. Really enjoying what you've done with version 2! Feels so much more ember-y :)

We're using a number of tooltips that show on hover. Previously in v0.7, I was using the mixin and just wouldn't render the tooltips on mobile, but I was just wondering how I could set all of the tooltips not to show on mobile?

Is there something I could do to stop all tooltips from being created in mobile (my app knows when it is mobile) other than wrapping all of the {{#tooltip-on-element}} in {{#if}} blocks?

Maybe by extending the tooltip component?

@sir-dunxalot
Copy link
Owner

The easiest solution would be to hide the tooltips using CSS and media queries. If you wanted to prevent the tooltips from rendering you could extend the tooltip component and overwrite show().

You could also programmatically change the showOn param for mobile devices. Something like ember-resize might help.

Hopefully that helps. I'm going to close this as a library issue but feel free to keep the conversation going on here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants