0

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?

alexanoid
  • 24,051
  • 54
  • 210
  • 410
  • 1
    Have you looked at this addon https://vaadin.com/directory/component/tooltips4vaadin ? I think this will help you – gidravlic Nov 03 '22 at 10:58

1 Answers1

3

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.

Tatu Lund
  • 9,949
  • 1
  • 12
  • 26
Rolf
  • 2,178
  • 4
  • 18
  • 29