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

Tooltip for input remains after action #7

Closed
jchamet opened this issue Jul 21, 2015 · 4 comments
Closed

Tooltip for input remains after action #7

jchamet opened this issue Jul 21, 2015 · 4 comments
Labels

Comments

@jchamet
Copy link

jchamet commented Jul 21, 2015

I use ember liquid-fire which allows smooth transitions between routes. I have an action attached to input fields so that when a user presses the enter key within an input field, it takes them to a new route.

Unfortunately, the old tooltip for the input field (that no longer is present) remains on the screen and requires a hard refresh to remove.

If there could be a way to trigger a tooltip clear on transition change, that would solve this issue.

@sir-dunxalot
Copy link
Owner

Hey James,

The issue could be caused by some interaction between liquid fire and ember-tooltips but I imagine we need a more stable way to clear tooltips across the board. For example:

destroyTooltip: Ember.on('willDestroyElement', function() {
  const tooltip = this.get('tooltip');

  if (tooltip) {
    tooltip.detach();
  }
}),

Do you think that would solve the problem here?

@sir-dunxalot
Copy link
Owner

(And that code would be in the tooltip mixin).

@jchamet
Copy link
Author

jchamet commented Jul 22, 2015

Your solution appears to work. Do you plan on committing this change to master?

@sir-dunxalot
Copy link
Owner

Yep, definitely. Not sure when though - I have a lot on my plate. I would be happy to accept a PR for an interim fix in the meantime (even if it doesn't add functionality for tooltips rendered using the renderChildTooltip() method.

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

No branches or pull requests

2 participants