6pac / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://stackblitz.com/github/6pac/SlickGrid/tree/master/vite-demo
MIT License
1.85k stars 423 forks source link

The GridMenu is stay on the same place if the block table moved #997

Closed Berdmanfolk closed 8 months ago

Berdmanfolk commented 8 months ago

Describe the bug

Hello! The GridMenu is stay on the same place if the block table moved. The gridMenu have to move also with table block or to auto close, when then the block table moved.

Reproduction

I have use slickgrid in widget like on the main screen https://golden-layout.com/

Which Framework are you using?

Vanilla / Plain JS

Environment Info

| Executable          | Version |
| ------------------- | ------- |
| (framework used)    | 5.8.1|
| SlickGrid | VERSION |
| TypeScript          | 5.8.1|
| Browser(s)          | 5.8.1 |
| System OS           | windows 10|

Validations

ghiscoding commented 8 months ago

that is expected since the Grid Menu is appended to the body with an absolute position. I never have this problem since most of my grids take the entire available space and I never scroll the body itself. Also note that there are a few other plugins that also append to the body, like ColumnPicker, HeaderMenu, CellMenu, ContextMenu, ...

ghiscoding commented 8 months ago

I think you should handle that yourself

document.body.addEventListener('scroll', () => {
  gridMenu.hideMenu();
});
ghiscoding commented 8 months ago

Closing since it works as expected and no feedback provided. Also as I mentioned the Grid Menu and other plugins are appended to the body and if something changes in your page then you should handle closing the Grid Menu (or other plugins) yourself per the suggestion provided above. Doing a quick test with scrolling the browser does work as expected, so I don't think that we can do anything on our side, it's your code and it's for you to fix it

msedge_YFgI4C4wju