Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Add missing non-bubbling DOM events to EventDelegator

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Add all remaining non-bubbling DOM events to EventDelegator.ts

Description

Blazor's event delegation requires a fixed list of non-bubbling events to register capture listeners instead of bubble listeners. The existing list covered ~95% of use cases but was missing several events per MDN documentation.

Added events (verified via MDN bubbles: false):

  • beforeunload - Window beforeunload
  • contextlost / contextrestored - Canvas 2D context events
  • formdata - Form data construction
  • invalid - Form validation
  • lostpointercapture - Pointer capture release
  • resize - Window resize
  • securitypolicyviolation - CSP violation
  • slotchange - Web Components slot change

Events verified to bubble (NOT added):

  • select, scrollend, gotpointercapture, fullscreenchange, fullscreenerror

Also sorted the list alphabetically for maintainability.

Original prompt

This section details on the original issue you should resolve

<issue_title>Support all nonbubbling events</issue_title>
<issue_description>Today, Blazor has a fixed list of nonbubbling DOM events in EventDelegator.ts. It covers maybe 95% of what anyone will ever want to use. However there are some more obscure nonbubbling DOM events, so we should check the complete list at https://developer.mozilla.org/en-US/docs/Web/Events and consider adding all the rest.

Alternatively if one day we didn't do event delegation, we wouldn't need any special cases here in the first place.</issue_description>

Comments on the Issue (you are @copilot in this section)

@ We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our [Triage Process](https://github.com/dotnet/aspnetcore/blob/main/docs/TriageProcess.md). @ We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our [Triage Process](https://github.com/dotnet/aspnetcore/blob/main/docs/TriageProcess.md).

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@dotnet-policy-service
Copy link
Contributor

Greetings! You've submitted a PR that modifies code that is shared with https://github.com/dotnet/runtime . Please make sure you synchronize this code with the changes in that repo!

Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for additional nonbubbling DOM events Add missing non-bubbling DOM events to EventDelegator Dec 3, 2025
Copilot AI requested a review from javiercn December 3, 2025 23:36
Copilot finished work on behalf of javiercn December 3, 2025 23:36
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.

Support all nonbubbling events

2 participants