Created by: benogle
Currently tooltips do not respect their container. eg. I have a button jammed up against the right side of the page, and place a tooltip on the top, it will stick out of the page.
So I added two new options:
-
viewport
: defaults to'body'
. It's the selector the tip should stay inside. -
viewportPadding
: how far, in px should it stay from the edges
Since this is visual, I added an example. Not sure how you want this tested. I assume you want unit tests? Is the example sufficient?
Let me know what you need to get this merged. Thanks.
Similar to and inspired by #11347, but adjusting in a different place.