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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

keithamus
Copy link

@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

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.

3 participants