Frontmatter
| id | 9478 |
| title | Grid ScrollManager: Support dynamic windowId changes for Main Thread Addon registration |
| state | Closed |
| labels | bugaigrid |
| assignees | tobiu |
| createdAt | Mar 15, 2026, 2:59 PM |
| updatedAt | Mar 15, 2026, 3:06 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9478 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 15, 2026, 3:06 PM |
Grid ScrollManager: Support dynamic windowId changes for Main Thread Addon registration

tobiu
Mar 15, 2026, 3:06 PM
Input from Gemini 3.1 Pro:
✦ I have implemented the requested changes:
- Introduced
windowId_(String|null) toNeo.grid.ScrollManager.- Implemented
afterSetWindowIdto correctly unregister old addons and register new ones when the windowId changes dynamically.- Updated
Neo.grid.Containerto pass the initialwindowIdand properly proxy dynamicwindowIdchanges to thescrollManager.- Fixed the formatting to use
let me = this;per the standard.The changes have been committed and pushed to the repository. I will now close the issue.
tobiu assigned to @tobiu on Mar 15, 2026, 3:06 PM
tobiu closed this issue on Mar 15, 2026, 3:06 PM
The
ScrollManagerfor theNeo.grid.Containercurrently determines thewindowIdfor registering Main Thread Addons (likeGridDragScrollandGridRowScrollPinning) by reading it directly from its assignedgridContainerinside the addon update methods.However, in a multi-window architecture, if a grid component is moved from one browser window to another, the
windowIdof the grid changes dynamically. BecauseScrollManagerextendsNeo.core.Baseand is instantiated once, simply reading the container'swindowIdon-the-fly or ignoring its dynamic updates means the addons won't be properly unregistered from the old window and registered in the new window.To fix this and ensure full multi-window support:
windowId_reactive config inScrollManager.afterSetWindowId(value, oldValue)hook. IfoldValueis truthy (meaning a dynamic move happened), it should trigger a re-registration of the active addons.Neo.grid.Containerto pass itswindowIdinto theScrollManagerconfig duringonConstructed().Neo.grid.Container'safterSetWindowIdmethod to explicitly set the newwindowIdonto itsscrollManagerinstance when a window move occurs.