Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added special handling for React's onDoubleClick event. #89

Merged
merged 4 commits into from
May 22, 2023

Conversation

volkanceylan
Copy link
Contributor

React has a onDoubleClick event but afaik it is eventually mapped to dblclick DOM event (https://developer.mozilla.org/en-US/docs/Web/API/Element/dblclick_event).

Preact Compat has special handling for onDoubleClick (https://github.com/preactjs/preact/blob/87024e8480c6a60bf114d6c69791a87cec0c553a/compat/src/render.js#L146).

Without this patch, jsx-dom considers onDoubleClick as a custom event, and attaches the event handler as a custom event to "doubleClick" event, which does not exist.

…is considered as if it is a custom 'doubleClick' event by jsx-dom. Also added typing for onDblClick event, which is the actual event name.
Copy link
Owner

@alex-kinokon alex-kinokon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the code through prettier and use let

@alex-kinokon alex-kinokon merged commit 6b0a0e2 into alex-kinokon:master May 22, 2023
@alex-kinokon
Copy link
Owner

published as 8.0.6

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.

2 participants