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

Updating text of centered tooltip doesn't update the tooltip position #13

Closed
maxpaj opened this issue Sep 2, 2017 · 4 comments
Closed

Comments

@maxpaj
Copy link
Contributor

maxpaj commented Sep 2, 2017

I just stumbled upon this problem.

I was however able to solve it by setting a ref="someName" attribute on the <popper> and then using $refs.someName.popperJS.update() manually.

Here's a JSFiddle. Try clicking the "bottom" link:
https://jsfiddle.net/maxpaj/9qvmn093/

@RobinCK
Copy link
Owner

RobinCK commented Jan 24, 2018

Hi @maxpaj
Sorry for a long time did not answer, did not quite understand what the problem is

@RobinCK RobinCK closed this as completed Jan 31, 2018
@maxpaj
Copy link
Contributor Author

maxpaj commented Jan 31, 2018

If a tooltip has it's contents (text for example) updated while it is being displayed and the tooltip is configured to be centered, it won't be centered after the content changes.

So it looks like this, a centered tooltip below ref:

              ref
        _______________
        |    test     |
        ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨

Then after changing the content, not centered below ref anymore:

              ref
        _________________________________
        |    test with more content     |
        ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨

Then if you drag away the mouse so the tooltip is hidden and then make it appear again, it will have adjusted:

              ref
_________________________________
|    test with more content     |
¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨

@maxpaj maxpaj changed the title Updating interpolated content inside tooltip doesn't update the tooltip position Updating text of centered tooltip doesn't update the tooltip position Jan 31, 2018
@RobinCK RobinCK reopened this Jan 31, 2018
@daverogers
Copy link

I was however able to solve it by setting a ref="someName" attribute on the <popper> and then using $refs.someName.popperJS.update() manually.

Error: TypeError: _this.$refs.someName.update is not a function

Fix: this.$refs.someName.updatePopper()

@RobinCK
Copy link
Owner

RobinCK commented May 10, 2018

thanks

@RobinCK RobinCK closed this as completed May 10, 2018
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

3 participants