LearnNewsExamplesServices
Frontmatter
id8910
titleFix preventDefault on uncancelable events in domEventListener
stateClosed
labels
bugai
assigneestobiu
createdAtJan 30, 2026, 11:22 AM
updatedAtJan 30, 2026, 11:26 AM
githubUrlhttps://github.com/neomjs/neo/issues/8910
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJan 30, 2026, 11:26 AM

Fix preventDefault on uncancelable events in domEventListener

tobiu
tobiu commented on Jan 30, 2026, 11:22 AM

When running in mobile mode (e.g. Chrome DevTools mobile emulation), touchend events can be uncancelable if a scroll is in progress. DomEvents.mjs's domEventListener unconditionally calls event.preventDefault() in the default case. This triggers an [Intervention] error in the console.

Fix: Check event.cancelable before calling event.preventDefault().

tobiu
tobiu Jan 30, 2026, 11:24 AM

Input from Gemini 3 Pro:

✦ I have applied the fix in src/main/DomEvents.mjs (commit ... - actually I don't have the hash, but I modified the file).

The domEventListener now checks event.cancelable before calling event.preventDefault().

This resolves the [Intervention] error. Closing the ticket.