Closing tooltip #1714
Replies: 2 comments 4 replies
-
@isidorn do you have a suggestion here? |
Beta Was this translation helpful? Give feedback.
-
You see two inlay hints ("Default" and "Chest Front-Back") (also inlay hints are provided by the extension) When I hover cursor over the inlay hint, it's tooltip is displayed. Then I click on an item of the tooltip, and a command is executed. The command immediately replaces text ("0" is replaced with "4"), and it refreshes the inlay hints afterwards ("Default" is replaced by "Water") But as you can see, the tooltip is still open/visible after these operations. I want the tooltip to be closed/invisible after I click on the tooltip (either before or after the command is executed) Guess there's no API call for that, but is there a recommenced hack to achieve that, such as shifting focus to text editor window or simulating escape key press? |
Beta Was this translation helpful? Give feedback.
-
How do I close the tooltip from the code?
My extension has inlay hints, and inlay hints have tooltips. Was able to add commands to the tooltips, so tooltips are clickable. When I click the tooltip and the command gets executed, the tooltip is still visible. I want the tooltip to be closed after clicking, how to achieve that with minimal impact, without effecting other windows etc?
Tried these below, none working so far
Also the command replaces some text in the text editor first, then refreshes the inlay hints
Beta Was this translation helpful? Give feedback.
All reactions