svelte-use-tooltip icon indicating copy to clipboard operation
svelte-use-tooltip copied to clipboard

Position tooltip regarding window boundaries

Open untemps opened this issue 1 year ago • 0 comments

The position of the tooltip is defined by the developer and is fixed wherever is the target inside the screen so far. It would be nice to keep that behaviour by default and allow to automatically re-position the tooltip if it is not visible because of the parent element or the screen boundaries. For example, if the position is set to right and the target is stuck against the window right boundary, we'd like to change the position to left. The convention might be to re-position the tooltip to the opposite side. I can't see any usecase for having a prop to force the position even if the tooltip is not visible.

untemps avatar Jul 07 '22 06:07 untemps