Frontmatter
| id | 8912 |
| title | Enhance Mouse Event Data and Refine Grid Drag Logic |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 30, 2026, 12:29 PM |
| updatedAt | Jan 30, 2026, 12:39 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8912 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 30, 2026, 12:39 PM |
Enhance Mouse Event Data and Refine Grid Drag Logic

tobiu
Jan 30, 2026, 12:39 PM
Input from Gemini 3 Pro:
✦ I have implemented the refinements for robust mouse drag scrolling in
src/main/DomEvents.mjsandsrc/grid/ScrollManager.mjs.Changes:
- Event Data Enhancement: Updated
getMouseEventDatainsrc/main/DomEvents.mjsto extract and passbuttonandbuttonsproperties.- Logic Refinement: Updated
ScrollManager.mjs:
onMouseDown: Added check fordata.button === 0(left click only).onMouseMove: Added check fordata.buttons === 1(left button held).onMouseLeave: Removed the handler (and listener registration) to allow drag continuity when cursor leaves the element (relying onbuttonsstate for validity).This ensures drag-scrolling only engages on left-click and robustly handles cases where the mouse momentarily leaves the grid area.
Closing the ticket.
tobiu assigned to @tobiu on Jan 30, 2026, 12:39 PM
tobiu closed this issue on Jan 30, 2026, 12:39 PM
To robustly handle drag-to-scroll interactions, especially distinguishing between left-click drags and other mouse interactions, we need access to the standard
event.buttonandevent.buttonsproperties in the App Worker. Currently,DomEventsdoes not extract these.Requirements:
getMouseEventDatainsrc/main/DomEvents.mjsto includebuttonandbuttons.onMouseDowninScrollManager.mjsto checkdata.button === 0.onMouseMoveinScrollManager.mjsto checkdata.buttons === 1.mouseleavehandling inScrollManager.mjsto rely onbuttonsstate for drag continuity.