Skip to content

Normalize onDoubleClickCapture to a real dblclick listener - #5224

Open
contactjawad wants to merge 1 commit into
preactjs:mainfrom
contactjawad:fix-ondoubleclickcapture
Open

Normalize onDoubleClickCapture to a real dblclick listener#5224
contactjawad wants to merge 1 commit into
preactjs:mainfrom
contactjawad:fix-ondoubleclickcapture

Conversation

@contactjawad

Copy link
Copy Markdown

onDoubleClick is normalized to dblclick in compat, but the capture variant isn't:

<div onDoubleClickCapture={fn} />

The check is an exact === 'ondoubleclick', so onDoubleClickCapture slips past it. Core then strips the Capture suffix and registers a listener for doubleclick with capture — an event the DOM never fires — so fn never runs.

I added the capture branch next to the existing one so it maps to ondblclickCapture, and core ends up with addEventListener('dblclick', fn, true). Test added alongside the existing onDoubleClick one.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

📊 Tachometer Benchmark Results

Summary

A summary of the benchmark results will show here once they finish.

Results

The full results of your benchmarks will show here once they finish.

tachometer-reporter-action v2 for CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant