alexanoid
alexanoid

Reputation: 25892

Vaadin 23.3 close tooltip by clicking on the text

I'm upgraded to Vaadin 23.3 Preview because of Tooltip component. Works and looks great. Only one question - I use the tooltip as a toggletip. I added an icon to my textfield and manually open tooltip by clicking it. In order to close the tooltip, I have to click the icon one more time. Is it possible somehow to close the tooltip by clicking the tooltip text also?

Upvotes: 0

Views: 212

Answers (1)

Rolf
Rolf

Reputation: 2418

That's not supported, as the Tooltip feature is not intended to be used for anything interactive. As the docs say:

Tooltips only support plain text content. They aren’t focusable and can’t contain interactive elements.

Due to technical (and especially accessibility) reasons, interactive popups like that need a different implementation. There are some vague plans to add such a feature to the Vaadin platform in the future, however.

One component in the Vaadin's Directory that can be considered better suited for the task is Popup.

Upvotes: 3

Related Questions