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
53 stars 6 forks source link

Collision-Detection for menu items is not working correctly #10048

Open MPulxeR opened 2 weeks ago

MPulxeR commented 2 weeks ago

Hi bryntum team, we currently facing issues with the menu component on some edge cases ...

Demo: I've tried to recreate the issue here: https://codepen.io/Martin-Szigas/pen/wvbyzgR

Screenshot: image

Issue: The collision detection for menu component is in some cases not working properly. It does not detect properly that the menu size collides with the visible area of the browser. Sometimes the menu flips below a button ... sometimes its above. However in some cases, menu does not flip and collides with the outside area and displays a scrollbar ... despite there is enough free space on the flip direction available.

Expected behaviour is that the popup checks if there is a collision to the visible space, and checks if there is enough space on the flip direction ... image

Hope you can check and fix the issue.

Best regards, Martin

ExtAnimal commented 4 days ago

This issue in the Codepen is that the <body> element is not sized which it would be in all well developed apps.

If you are creating a web site which is a flowing document, the body will only be the height of the content.

In a Single Page Application, the body does not scroll. Rather it is a full sized viewport in which the individual widgets are all laid out and sized by the application's CSS rules.

As a basis, Single Page Applications need the following:

html,
body {
    height: 100dvh;
    overflow: clip;
}
body {
    display: flex;
    margin: 0;
    align-items: stretch;
}
Screenshot 2024-09-23 at 08 35 02