Forum Discussion
Custom visual: Tooltip closes after opening
I seem to have fixed the problem I was having, though technically its working around the deeper concern I have with the hide that the mouseover does on the tooltip display.
I have a hoverTarget class that I am using to add/remove pointer events to my map. And the debounce timeout I have in it was including notifying of a mousemove (cancel event) within the timeout. More specifically I was doing a check within the timeout and either emitting a cancelled or hovered event depending on certain conditions.
By emitting the cancelled event before setting the timeout I am able to handle that in the visual and hide the tooltip faster than the powerbi event that hides the tooltip can be triggered. Since that powerbi event was causing the issue, not-letting it trigger means my flashing tooltip issue has been 'solved'.
I'm not really able to setup a test case at present as tracking down this issue has put me a little behind schedule. However, I can suggest a test case if someone is willing to verify the behavior:
All that should be required is a simple visual with a button that when clicked opens a tooltip, in particular a report page tooltip.
Rather than creating a new tooltip wrapper, the visual should use options.host.tooltipService.show(...) and the show options should indude identifiers.
This would also require a report page tooltip and that the visual tester be configured to show tooltips and point it to the tooltip report page.
Testing the visual would mean showing the tooltip via button click. Mousing over the tooltip to dismiss it, then clicking the button again.
If doing so causes the tooltip to show then hide then that would confirm it has nothign to do with all the other stuff happening in my code and that it is a bug that should be reported to Microsoft.