-
Notifications
You must be signed in to change notification settings - Fork 81
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 does not keep position on buttons #218
Comments
Can you add some example code or make a jsfiddle or something so that we can investigate? |
Hello @tmcconechy , I was able to reproduce. It seems to cause errors when soho-toolbar-searchfield is used with button that changes on click see attached minimal reproduction html and javascript + video |
Did you try to destroy the tooltip on the click event and then recreate it afterwords after loading the other button? Also i guess you are intending to toggling the icon, i would suggest working a way to change the icon text instead of the whole button. That should fix it as well. I think we should be able to make an enterprise example for this (not an ng issue). |
I did not try it, but this would mean that we would have to destroy tooltip everywhere in our application. |
The idea is you toggle the icon right? Maybe thats a better way. But putting this in as a bug for now so we can investigate further later. |
Took a look at this example on the latest 7.5.x and could no longer see this issue. Appears this has been fixed over time |
Hello @tmcconechy, we updated to 8.1.2 and the issue re-appeared again, we have seen with toolbar buttons that are used with ngIf |
Ok, come to think of it i have seen some random tooltips floating around. We should probably get to the bottom of this. I suspect its the place logic placing it at 0,0 then moving it? |
yeah, if the button is removed from the DOM a random tooltip appears on the 0,0 (top left corner of the window) |
Yeah where ever it's doing that it should probably be hidden at that point. Also my mistake for closing it. I think i looked at the initial description and couldn't reproduce but the example was further down. Its still an issue and probably wasn't ever fixed |
I fixed this in pager which was showing this quite readily. The fix was to destroy the tooltip there before rebuilding it. Whats happening is a tick is firing after its removed. So i added code to the destroy to make sure this doesnt happen. We cant really call this randomly all over the place so if you do still see it you may need to call destroy. |
working as expected. thank you! |
Describe the bug
Sometimes click on button makes tooltip appear on different place
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tooltip would always show on correct place
Screenshots
Platform
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: