fix: rename dateselected custom event to fluentdateselected to resolve .NET 11 exception#4605
Merged
fix: rename dateselected custom event to fluentdateselected to resolve .NET 11 exception#4605
dateselected custom event to fluentdateselected to resolve .NET 11 exception#4605Conversation
…ET 11 exception Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Rename event name to customdateselected or fluentdateselected
fix: rename Mar 7, 2026
dateselected custom event to fluentdateselected to resolve .NET 11 exception
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 61%
|
Contributor
There was a problem hiding this comment.
Pull request overview
Renames the registered Blazor custom event type for the dateselected DOM event to avoid a .NET 11 runtime exception caused by identical custom-event and browserEventName values.
Changes:
- Updated
registerCustomEventTypeidentifier fromdateselectedtofluentdateselected(while keepingbrowserEventName: 'dateselected').
Comments suppressed due to low confidence (1)
src/Core.Assets/src/index.ts:276
- This change addresses the .NET 11 restriction for
dateselected, but this file still registers other custom events where the custom event name equalsbrowserEventName(e.g.,scrollstart,scrollend,splitterresized,splittercollapsed). Given the runtime now throws when these are identical, the app will likely fail on the next registration afterfluentdateselected. Consider renaming those custom event identifiers as well (and updating any correspondingEventHandlerattributes/usages) so all registrations comply with the new constraint.
blazor.registerCustomEventType('fluentdateselected', {
browserEventName: 'dateselected',
createEventArgs: event => {
return {
calendarDateInfo: event.detail
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
dvoituron
approved these changes
Mar 7, 2026
This was referenced Mar 8, 2026
Merged
This was referenced Apr 22, 2026
Closed
This was referenced Apr 27, 2026
Open
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
.NET 11 throws a runtime exception when a custom Blazor event registered via
blazor.registerCustomEventType()has the same name as itsbrowserEventName. Thedateselectedevent registration violated this new constraint, causing:Change: Rename the custom event identifier from
'dateselected'to'fluentdateselected'while keeping thebrowserEventNameas'dateselected'(the actual DOM event fired by the web component).Follows the same scoping pattern used by other custom events in this file (e.g.,
tooltipdismiss→dismiss,expandedchange→expanded-change).🎫 Issues
👩💻 Reviewer Notes
Single-line change in
src/Core.Assets/src/index.ts. No C# or Razor changes required — there is no existing[EventHandler("ondateselected", ...)]binding or@ondateselectedusage in the codebase.📑 Test Plan
Verify the browser console no longer throws the exception on .NET 11 Preview 1+ when any page using
FluentCalendarorFluentDatePickeris loaded.✅ Checklist
General
Component-specific
⏭ Next Steps
No follow-up work required.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.