bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Tooltip not positioned correctly in some cases #9076

Open marciogurka opened 6 months ago

marciogurka commented 6 months ago

Forum post

"Hello Bryntum team!

Just wanted to confirm if this is something expected to happen for Tooltips in general.

I see that Bryntum handles well the Tooltip positioning based if the hovered element is too close to the top/bottom of the viewport.

Though I found that in rare cases the Tooltip will actually not be positioned to the bottom of the element. Instead it will persist on showing from the Top, and it will apply a overflow so the content can be scrolled.

If this is an expected behavior, I guess I am required to set allowOver: true to be able to see all the content?

Attached an image of this happening tooltip-container-overflow.png"

tooltip-placed-on-top-but-bottom-has-more-space

ExtAnimal commented 6 months ago

This is expected behaviour of Tooltip.

The align config of a Widget describes all aspects of aligning behaviour.

Tooltip's align object uses minHeight : 300 meaning that when showing above or below something it is willing to shrink to 300 pixels high before it gives up on that position and flips to the other side:

Screenshot 2024-05-01 at 17 02 35

See here for all the options that align has to exactly specify how to align to a target: https://bryntum.com/products/grid/docs/api/Core/widget/Widget#typedef-AlignSpec

Maybe we can somehow document that tooltip has this value in its default align value.