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

Support beforetoggle/toggle events for dialog #32479

Merged
merged 2 commits into from
Mar 5, 2025
Merged

Conversation

keithamus
Copy link
Contributor

@keithamus keithamus commented Feb 26, 2025

Summary

I don't know if this is the correct change to make, but I figured a PR is maybe more productive than an issue. Right now, the dialog element emits beforetoggle/toggle events that React doesn't support, as they're non bubbling and it seems all non-bubbling event listeners need to be hard coded. This PR adds support for these by adding the listenToNonDelegatedEvent calls to the dialog element to get these events working.

Read more about these events on MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event.

How did you test this change?

I haven't tested this change.

@react-sizebot
Copy link

Comparing: ebc22ef...e41d928

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js +0.02% 515.73 kB 515.84 kB = 92.10 kB 92.10 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.02% 565.65 kB 565.77 kB = 100.87 kB 100.87 kB
facebook-www/ReactDOM-prod.classic.js +0.02% 636.71 kB 636.83 kB = 112.07 kB 112.07 kB
facebook-www/ReactDOM-prod.modern.js +0.02% 627.03 kB 627.14 kB = 110.48 kB 110.49 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 9dc9602

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

@eps1lon eps1lon merged commit aac177c into facebook:main Mar 5, 2025
194 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 5, 2025
github-actions bot pushed a commit that referenced this pull request Mar 5, 2025
@keithamus keithamus deleted the patch-1 branch March 5, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants