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 does not keep position on buttons #218

Closed
Fruko opened this issue Oct 15, 2018 · 13 comments · Fixed by infor-design/enterprise#4649
Closed

Tooltip does not keep position on buttons #218

Fruko opened this issue Oct 15, 2018 · 13 comments · Fixed by infor-design/enterprise#4649

Comments

@Fruko
Copy link

Fruko commented Oct 15, 2018

Describe the bug
Sometimes click on button makes tooltip appear on different place

To Reproduce
Steps to reproduce the behavior:

  1. Copy this example over searchfield.demo.html and run it reproduction-tooltip-bug.zip

Expected behavior
Tooltip would always show on correct place

Screenshots
image

image

Platform

  • OS Version: Windows 10
  • Browser Name: Chrome

Additional context
Add any other context about the problem here.

@tmcconechy
Copy link
Member

Can you add some example code or make a jsfiddle or something so that we can investigate?

@Fruko
Copy link
Author

Fruko commented Oct 17, 2018

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

reproduction-tooltip-bug.zip

@tmcconechy
Copy link
Member

tmcconechy commented Oct 17, 2018

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).

@tmcconechy tmcconechy added type: bug 🐛 [3] Velocity rating (Fibonacci) and removed status: cant reproduce labels Oct 17, 2018
@Fruko
Copy link
Author

Fruko commented Oct 18, 2018

I did not try it, but this would mean that we would have to destroy tooltip everywhere in our application.
Also the example just shows icon button,but I suspect this would happen in different cases too

@tmcconechy
Copy link
Member

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.

@tmcconechy tmcconechy added this to To do in Enterprise 4.33.x (Sep 2020) Sprint via automation Aug 26, 2020
@tmcconechy tmcconechy self-assigned this Sep 2, 2020
@tmcconechy
Copy link
Member

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

@Fruko
Copy link
Author

Fruko commented Nov 18, 2020

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

@tmcconechy
Copy link
Member

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?

@tmcconechy tmcconechy added this to To do in Enterprise 4.36.x (Dec 2020) Sprint via automation Nov 18, 2020
@tmcconechy tmcconechy reopened this Nov 18, 2020
@tmcconechy tmcconechy removed their assignment Nov 18, 2020
@Fruko
Copy link
Author

Fruko commented Nov 18, 2020

yeah, if the button is removed from the DOM a random tooltip appears on the 0,0 (top left corner of the window)

@tmcconechy
Copy link
Member

tmcconechy commented Nov 18, 2020

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

@tmcconechy tmcconechy added this to To do in Enterprise 4.35.x (Nov 2020) Sprint via automation Nov 30, 2020
@tmcconechy tmcconechy self-assigned this Nov 30, 2020
@tmcconechy
Copy link
Member

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.

@tmcconechy
Copy link
Member

PR infor-design/enterprise#4649

@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.35.x (Nov 2020) Sprint Dec 1, 2020
@jbrcna
Copy link

jbrcna commented Dec 2, 2020

@jbrcna jbrcna moved this from Ready for QA (beta) to Done in Enterprise 4.35.x (Nov 2020) Sprint Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants