Context
The web desktop (#21075, PR #21087) opens an app on a single tap on a touch device, while a mouse click only selects and a double-click opens. Emmy's review of #21087 (Request Changes, 5914795110) showed that on a touch-capable computer a mouse click opens the app too. The launcher can only consult the device flag (Neo.config.hasTouchEvents), because the click that reaches the app worker does not say which pointer produced it. In her Chromium probe the native click events did carry it: pointerType: "mouse" for a trusted mouse click and "touch" for a finger tap, in one context.
The Problem
An app that answers a tap differently from a click has no per-event signal to read, so it either guesses from the device or treats every input alike. The guess is wrong on every hybrid device: a laptop with a touch screen, a tablet with a mouse or a pen.
The Architectural Reality
Neo.main.DomEvents#onClick, onDoubleClick, onContextMenu and the other mouse handlers serialize the event through getMouseEventData (src/main/DomEvents.mjs). That method copies a fixed list of MouseEvent fields (altKey, button, buttons, clientX … shiftKey) and nothing else.
- In current Chromium,
click, auxclick and contextmenu are PointerEvents carrying pointerType ("mouse", "pen", "touch"). dblclick, mousedown and mouseup are plain MouseEvents without it. A browser that dispatches click as a MouseEvent carries none either.
- The drag sensors read
pointerType on the main thread (src/main/draggable/sensor/Pointer.mjs, #17889), but nothing forwards it to the app worker.
The Fix
getMouseEventData copies pointerType with the other fields: the event's value where it has one, and undefined where it has none, so an app can tell "no signal" from "mouse".
- Its JSDoc names the field and the fallback a consumer needs.
- A unit arm in
test/playwright/unit/main/DomEvents.spec.mjs proves both: a click carrying pointerType: "touch" reaches the app with it, and a double-click without one reaches it with undefined.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Mouse event data sent to the app worker (Neo.main.DomEvents#getMouseEventData) |
the native event |
adds pointerType, copied from the event |
undefined when the event carries none (MouseEvent, older browsers) |
the method's JSDoc |
the unit arm; #21087's launcher reading it |
Acceptance Criteria
Out of Scope
- Forwarding
pointerdown / pointerup as their own app events.
- Changing the drag sensors.
- Any consumer change. The web desktop launcher reads the field in #21087, which carries this change.
Avoided Traps
- Inferring the pointer from the device (
Neo.config.hasTouchEvents): it is constant per device, while hybrid devices switch per event.
- Correlating a separately forwarded
pointerdown with the next click in the app: two messages, an ordering assumption and state in every consumer, for a field the click already has.
Related
Ownership: self-assigned; it unblocks #21087's required action, so it is not marked for contributors.
Live latest-open + closed sweep: checked latest 20 open + open and closed search ("pointerType", "pointer type click", "click event data pointer", "click pointer touch mouse", "tap opens touch device", "getMouseEventData"; Out of Scope read on #17889) at 2026-11-16T03:49Z; no equivalent or prior exclusion found. Backlog: 65 open (red); no owning ticket exists for the engine field, and the consumer's epic is #21061.
A2A claim sweep: last 30 messages at 2026-11-16T03:29Z and every unread message since, read at 03:45Z; no overlapping claim.
MC sweep: "click event data has no pointer type, touch tap versus mouse click on a hybrid device", 10 results; no prior decision. The one hit is a drag-sensor lesson: read the sensor before filing. Here the serializer was read before filing.
Own-assignment sweep: 11 open, none overlapping.
Origin Session ID: 7ceb0de7-6fcc-4777-879b-3a305deac77f
Retrieval Hint: "click event data pointerType touch mouse hybrid device DomEvents getMouseEventData"
Context
The web desktop (#21075, PR #21087) opens an app on a single tap on a touch device, while a mouse click only selects and a double-click opens. Emmy's review of #21087 (Request Changes,
5914795110) showed that on a touch-capable computer a mouse click opens the app too. The launcher can only consult the device flag (Neo.config.hasTouchEvents), because the click that reaches the app worker does not say which pointer produced it. In her Chromium probe the native click events did carry it:pointerType: "mouse"for a trusted mouse click and"touch"for a finger tap, in one context.The Problem
An app that answers a tap differently from a click has no per-event signal to read, so it either guesses from the device or treats every input alike. The guess is wrong on every hybrid device: a laptop with a touch screen, a tablet with a mouse or a pen.
The Architectural Reality
Neo.main.DomEvents#onClick,onDoubleClick,onContextMenuand the other mouse handlers serialize the event throughgetMouseEventData(src/main/DomEvents.mjs). That method copies a fixed list ofMouseEventfields (altKey,button,buttons,clientX…shiftKey) and nothing else.click,auxclickandcontextmenuarePointerEvents carryingpointerType("mouse","pen","touch").dblclick,mousedownandmouseupare plainMouseEvents without it. A browser that dispatchesclickas aMouseEventcarries none either.pointerTypeon the main thread (src/main/draggable/sensor/Pointer.mjs, #17889), but nothing forwards it to the app worker.The Fix
getMouseEventDatacopiespointerTypewith the other fields: the event's value where it has one, andundefinedwhere it has none, so an app can tell "no signal" from "mouse".test/playwright/unit/main/DomEvents.spec.mjsproves both: a click carryingpointerType: "touch"reaches the app with it, and a double-click without one reaches it withundefined.Contract Ledger Matrix
Neo.main.DomEvents#getMouseEventData)pointerType, copied from the eventundefinedwhen the event carries none (MouseEvent, older browsers)Acceptance Criteria
pointerTypereaches the app worker with the same value.dblclick, aMouseEventclick) reaches it withpointerType: undefined; every other field is unchanged.getMouseEventDatanames the field and its fallback.Out of Scope
pointerdown/pointerupas their own app events.Avoided Traps
Neo.config.hasTouchEvents): it is constant per device, while hybrid devices switch per event.pointerdownwith the next click in the app: two messages, an ordering assumption and state in every consumer, for a field the click already has.Related
Ownership: self-assigned; it unblocks #21087's required action, so it is not marked for contributors. Live latest-open + closed sweep: checked latest 20 open + open and closed search ("pointerType", "pointer type click", "click event data pointer", "click pointer touch mouse", "tap opens touch device", "getMouseEventData"; Out of Scope read on #17889) at 2026-11-16T03:49Z; no equivalent or prior exclusion found. Backlog: 65 open (red); no owning ticket exists for the engine field, and the consumer's epic is #21061. A2A claim sweep: last 30 messages at 2026-11-16T03:29Z and every unread message since, read at 03:45Z; no overlapping claim. MC sweep: "click event data has no pointer type, touch tap versus mouse click on a hybrid device", 10 results; no prior decision. The one hit is a drag-sensor lesson: read the sensor before filing. Here the serializer was read before filing. Own-assignment sweep: 11 open, none overlapping.
Origin Session ID: 7ceb0de7-6fcc-4777-879b-3a305deac77f Retrieval Hint: "click event data pointerType touch mouse hybrid device DomEvents getMouseEventData"