Repository navigation
MudTooltip: Only open on keyboard-visible focus - #14073
Conversation
Browsers raise focusin when a browser tab regains focus and when a closing dialog restores focus to its trigger, so a tooltip opened by an earlier click reappeared and stayed open without user intent (MudBlazor#13553, MudBlazor#4319). ShowOnFocus now opens the tooltip only when the focused element matches :focus-visible, checked through a stateless mudElementRef.isFocusVisible(). Unsupported selectors and failed interop fall back to the previous behavior. A focus version drops a pending check once focus has left, and the check is skipped when the tooltip is already visible or ShowOnFocus is off. With ShowOnClick, the focus from a pointer press no longer opens the tooltip ahead of pointer up, so the first click opens it instead of toggling it shut.
|
@sahilsao thanks for reporting #13553. This draft PR should fix it, and since you hit it in your own app, would you be able to test the branch against your scenario? Branch: Then reference Before/after screenshots (Chrome): Click, switch tab, return
Close a dialog with the mouse (focus returns to the trigger)
Keyboard Tab onto the trigger (should still open)
-- Coded by Codebringer / AI |
|
Looks Perfect, Thanks for the fix. |
doing a visual check now then I'll submit. Did you pull and test it? |
Port isFocusVisible to the TypeScript mudElementReference, add its bun test, and record it in the API surface snapshot.
Not tested in my machine some error occurs unable to start the project but based on the screenshots i think the problem is fixed. |
There was a problem hiding this comment.
I found one problem. The component change itself looks correct. The version counter drops a check result that comes back after focus has left. No interop call is made when the tooltip can't open. Tests run with loose JS interop, so existing tooltip tests that never set up isFocusVisible get false and don't break. The TS function, its test, the API snapshot and the XML docs all match the new behavior. The problem is that the new Activation Events text on the docs page says a pointer click never opens the tooltip, which is wrong for text inputs. There were no earlier findings to account for.
Docs page says a click never opens the tooltip, but text inputs still do
This sentence says that "a pointer click or focus that returns after a pointer action ... does not open it". Text inputs always match :focus-visible, though. So a tooltip around a MudTextField still opens on click and when you return to the browser tab. The ShowOnFocus XML docs already say this ("or any focus on a text input"), and the PR's Behavior change section does too.
AGENTS.md says docs descriptions must agree with current behavior. Please add the text-input exception here, for example: "...such as moving focus with the Tab key or focusing a text input, so a pointer click on a button...".
src/MudBlazor.Docs/Pages/Components/Tooltip/TooltipPage.razor:92
There was a problem hiding this comment.
The earlier docs finding is fixed. The diff now records which input moved focus to each element, and treats pointer focus on a text input as not keyboard focus. The docs page, the ShowOnFocus XML docs and the TS tests all match that. The C# side looks correct: the version counter drops results that arrive after focus has left, and there's no interop call when the tooltip can't open. One problem is left. The PR description's Behavior change section says text fields still open their tooltips on click, which the code no longer does, so a real breaking change is described the wrong way round.
PR description says the opposite of what the code does for text inputs
This line returns false when a pointer press moved focus to a text input, textarea or contenteditable element. So a ShowOnFocus tooltip around a MudTextField no longer opens on click or tap, or when you come back to the browser tab after clicking into the field. The docs page and XML docs in this diff say so ("A click or tap, including on a text input, does not open it"), and so does the bun test isFocusVisible for a text input after a pointer press.
The PR description's Behavior change section still says "Text inputs always match :focus-visible, so tooltips around text fields still open on click and on tab return, as before." That is no longer true. It's also a user-visible breaking change for every tooltip-wrapped input. AGENTS.md says breaking changes must be called out explicitly in the PR description. Please update that bullet so it says text fields no longer open their tooltip on pointer focus. Also re-check the Visual Evidence and Tested With claims about text fields, since they may have been measured before this change.
src/MudBlazor/TScripts/mudElementReference.ts:611
There was a problem hiding this comment.
🤖 Claude: Tested on head 77e9d6d in Chrome with real mouse and keyboard input, driven over raw CDP with real tab activation (so the page sees blur, visibilitychange, focus and a second focusin on return).
Tab-switch return, same scratch page on dev and on this branch:
- Click a ShowOnFocus button, move the mouse away, switch tab, return: dev leaves the tooltip open, this branch leaves it closed.
- Same with a button that has hover off: dev open, branch closed.
- Click into a text input and type, switch tab, return: dev open, branch closed.
- Keyboard Tab onto a button: tooltip opens, and is still open after switching tab and returning, on both.
Also checked with Playwright in Chromium, all matching the description: Tab and Shift+Tab open and close the tooltip, text input click does not open it but Tab into it does, ShowOnClick opens on the first click and closes on the second, closing a dialog with the mouse leaves no tooltip on the restored trigger, script focus after a click does not open it, and touch tap on a focus tooltip does not open it. No console errors.
Not tested: Firefox, Safari, real touch hardware, MAUI, and Escape-to-close on a dialog.
The :focus-visible gate matches what MUI and Floating UI do, and Radix has the same stuck-tooltip bug open (radix-ui/primitives#1800) with the same fix proposed. I did not find another library that uses pointer tracking for text inputs, but it is needed since browsers always treat a focused text input as :focus-visible.
One thing left from mudbot's last review: the Behavior change section of the description says text fields still open their tooltip on click, which the code no longer does.
Edit made. Thanks! |
Updated [Fido2](https://github.com/passwordless-lib/fido2-net-lib) from 4.3.2 to 4.3.3. <details> <summary>Release notes</summary> _Sourced from [Fido2's releases](https://github.com/passwordless-lib/fido2-net-lib/releases)._ ## 4.3.3 ## What's Changed * Bump System.Formats.Cbor to 9.0.24 by @aseigler in passwordless-lib/fido2-net-lib#700 **Full Changelog**: passwordless-lib/fido2-net-lib@4.3.2...4.3.3 Commits viewable in [compare view](passwordless-lib/fido2-net-lib@4.3.2...4.3.3). </details> Updated [Microsoft.AspNetCore.Components.WebAssembly](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Components.WebAssembly's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.AspNetCore.Components.WebAssembly.Server](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Components.WebAssembly.Server's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.AspNetCore.DataProtection.EntityFrameworkCore](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.DataProtection.EntityFrameworkCore's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.AspNetCore.Mvc.Testing](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.Mvc.Testing's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.AspNetCore.OpenApi](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.AspNetCore.OpenApi's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.EntityFrameworkCore.Design](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.EntityFrameworkCore.Design's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [Microsoft.Extensions.Http](https://github.com/dotnet/dotnet) from 10.0.14 to 10.0.15. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Extensions.Http's releases](https://github.com/dotnet/dotnet/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/dotnet/dotnet/commits). </details> Updated [ModelContextProtocol.AspNetCore](https://github.com/modelcontextprotocol/csharp-sdk) from 2.3.1 to 2.4.0. <details> <summary>Release notes</summary> _Sourced from [ModelContextProtocol.AspNetCore's releases](https://github.com/modelcontextprotocol/csharp-sdk/releases)._ ## 2.4.0 Version 2.4.0 adds experimental MCP Skills support through the new [ModelContextProtocol.Extensions.Skills](https://nuget.org/packages/ModelContextProtocol.Extensions.Skills) package, alongside OAuth hardening and reliability improvements for transport, session, and discovery flows. MCP Apps also now match protocol property names case-sensitively. ## What's Changed * Add the experimental MCP Skills extension #1856 by @girishkvs (co-authored by @PederHP) * Align Skills with server primitives and typed request handlers #1993 by @halter73 (co-authored by @Copilot) * Require explicit opt-in for the legacy OAuth metadata fallback #1952 by @halter73 (co-authored by @Copilot) * Preserve refresh tokens when OAuth refresh responses omit replacements #1968 by @halter73 (co-authored by @Copilot) * Preserve canonical OAuth resource identifiers during refresh #1967 by @halter73 (co-authored by @Copilot) * Fix cancellation being reported as missing OAuth metadata #1891 by @Empiree * Cancel open subscriptions/listen requests when the transport stops delivering messages #1933 by @pournasserian (co-authored by @Copilot) * Fix dropped notifications and cancellation when a request is canceled #1917 by @zerotohero3 * Prevent server/discover probes from committing the negotiated protocol version #1956 by @PrathmeshPawar2110 (co-authored by @claude) * Fall back to SSE when AutoDetect receives a 405 with a JSON-RPC error body #1849 by @ump45nose * Fix legacy output schemas for delegating server tools #1928 by @Oxygen56 * Match protocol property names case-sensitively #1934 by @FenjuFu ## Documentation Updates * Clarify Skills discovery and documentation #2000 by @halter73 (co-authored by @Copilot) * Fix Markdown link-check warnings and update the Skills specification link #1975 by @jeffhandley (co-authored by @Copilot) ## Test Improvements * Prevent discovery probe timeouts in controlled test connections #1946 by @tarekgh * Apply test discovery timeouts to Sampling_Stdio #1950 by @girishkvs * Use a task that runs until cancelled in the task store cancellation test #1955 by @girishkvs * Fix parallel integration test server startup #1982 by @jeffhandley (co-authored by @Copilot) ## Repository Infrastructure Updates * Bump fast-uri from 3.1.5 to 3.1.7 #1850 * Bump actions/deploy-pages from 5.0.0 to 5.0.1 #1858 * Support release-line docs publishing and release coordination #1972 by @jeffhandley (co-authored by @Copilot) * Bump docfx from 2.78.5 to 2.81.0 #1961 * Bump actions/setup-node from 7.0.0 to 7.1.0 #1927 * Bump becheran/mlc from 1.2.0 to 1.3.0 #1907 * Bump the other-testing group with 2 updates #1960 * Bump actions/download-artifact from 8.0.1 to 8.0.2 #1926 * Bump Anthropic from 12.40.0 to 13.3.0 #1962 * Bump the opentelemetry-testing group with 6 updates #1959 * Bump actions/upload-artifact from 7.0.1 to 7.0.2 #1925 * Fix CI selection of patched .NET SDKs #1995 by @tarekgh ## Acknowledgements * @Empiree made their first contribution in #1891 * @zerotohero3 made their first contribution in #1917 * @girishkvs made their first contribution in #1856 * @FenjuFu made their first contribution in #1934 ... (truncated) Commits viewable in [compare view](modelcontextprotocol/csharp-sdk@v2.3.1...v2.4.0). </details> Updated [MudBlazor](https://github.com/MudBlazor/MudBlazor) from 9.12.0 to 9.13.0. <details> <summary>Release notes</summary> _Sourced from [MudBlazor's releases](https://github.com/MudBlazor/MudBlazor/releases)._ ## 9.13.0 <!-- nuntia:start --> ## Highlights - **Charts.** Drag a finger across a line chart to scrub through tooltips with `ShowToolTipsOnTouch`. `XAxisLabelInterval` thins a crowded axis, and `YAxisTicks = 0` picks round steps for your data. Tooltips stay inside the chart and gridlines follow your theme. A 1,000-point line chart also mounts 40% faster and hovers twice as fast, and each hover sends 96% less data on Blazor Server. ([#14196](MudBlazor/MudBlazor#14196), [#14156](MudBlazor/MudBlazor#14156), [#14179](MudBlazor/MudBlazor#14179), [#14197](MudBlazor/MudBlazor#14197)) - **MudTreeView virtualization.** `Virtualize="true"` renders only the rows in view, which keeps large trees built from `Items` responsive. ([#13239](MudBlazor/MudBlazor#13239)) - **MudTable row links.** `RowHref` makes each row a real link, so Ctrl+click, middle click and the keyboard all work. ([#14130](MudBlazor/MudBlazor#14130)) ## Upgrading - **MudCarousel no longer rotates on its own.** Set `AutoCycle="true"` to keep it rotating. ([#14118](MudBlazor/MudBlazor#14118)) - **MudDataGrid keeps the order of `ServerData` rows when it has no pager.** If you relied on the grid to sort them, sort in your `ServerData` function with `OrderBySortDefinitions(state)`. ([#13964](MudBlazor/MudBlazor#13964)) - **`ShowOnFocus` tooltips open on keyboard focus only.** Focus from a click, tap or `FocusAsync()` no longer opens one. ([#14073](MudBlazor/MudBlazor#14073)) <!-- Do not remove this attribution notice --> *Drafted by [Nuntia](https://github.com/danielchalmers/Nuntia)* <!-- nuntia:end --> ## Known Issues - [MudDialog close button is positioned outside the dialog](MudBlazor/MudBlazor#14205) <!-- Release notes generated using configuration in .github/release.yml at dev --> ## What's Changed ### Breaking Changes * MudCarousel: Restore natural keyboard focus order by @Nacl-HCl in MudBlazor/MudBlazor#14008 * MudDataGrid: Keep the order of ServerData items when there is no pager by @AtakanUk in MudBlazor/MudBlazor#13964 * MudCarousel: Stop rotating automatically by default by @danielchalmers in MudBlazor/MudBlazor#14118 ### New Features * MudTable: Add RowHref and RowTarget for row links by @ahmedjanwar in MudBlazor/MudBlazor#14130 * MudTreeView: Add virtualization support by @angusdumaresq in MudBlazor/MudBlazor#13239 * Charts: Add XAxisLabelInterval by @danielchalmers in MudBlazor/MudBlazor#14156 * Charts: Pick a round axis step when YAxisTicks is 0 by @danielchalmers in MudBlazor/MudBlazor#14179 * Charts: Draw gridlines in the theme's line colour by @danielchalmers in MudBlazor/MudBlazor#14180 * Charts: Add `{{Y_AXIS_VALUE}}` tooltip placeholder by @danielchalmers in MudBlazor/MudBlazor#14183 * Charts: Add opt-in touch tooltips support by @danielchalmers in MudBlazor/MudBlazor#14196 ### Bug Fixes * Charts: Keep size reported within same millisecond as last one by @RicoSuter in MudBlazor/MudBlazor#14094 * MudDataGrid: Close filter menus on Escape by @danielchalmers in MudBlazor/MudBlazor#14102 * MudDivider: Make Light divider lighter than default in light theme by @danielchalmers in MudBlazor/MudBlazor#14114 * MudDialog: Update title, class and style of service-opened dialogs by @danielchalmers in MudBlazor/MudBlazor#14116 * MudTextField: Fix RTL layout of email and phone fields by @danielchalmers in MudBlazor/MudBlazor#14115 * MudTable: Keep MultiSelection checkbox column narrow by @danielchalmers in MudBlazor/MudBlazor#14117 * MudDialog: Fix pickers with PickerVariant.Dialog cut off by @vantaflow in MudBlazor/MudBlazor#14109 * MudDataGrid: Span full-width rows across displayed columns by @jeff377 in MudBlazor/MudBlazor#14124 * MudSnackbar: Fall back to severity icon when Icon is null by @jeff377 in MudBlazor/MudBlazor#14122 * MudPopover: Fix placement with body zoom by @milan-micieta in MudBlazor/MudBlazor#14074 * MudDatePicker: Open month and year views in the clicked column by @jeff377 in MudBlazor/MudBlazor#14125 ... (truncated) Commits viewable in [compare view](MudBlazor/MudBlazor@v9.12.0...v9.13.0). </details> Updated [OpenIddict.AspNetCore](https://github.com/openiddict/openiddict-core) from 7.8.0 to 7.9.0. <details> <summary>Release notes</summary> _Sourced from [OpenIddict.AspNetCore's releases](https://github.com/openiddict/openiddict-core/releases)._ ## 7.9.0 This release introduces the following changes: - A .NET 11 TFM was added to all the OpenIddict packages. - A vulnerability affecting the validation of authorization entries in the OpenIddict validation stack when token entry validation is not enabled was identified yesterday (thanks @DicksonWu654! ❤️) and fixed. > [!CAUTION] > Upgrading to OpenIddict 7.9.0 or 8.0.0 preview 6 is strongly advised. See GHSA-cxgj-hwwh-855g for more information. - The `OpenIddict.Client.WebIntegration` package now supports the Veriqa service (thanks @Ti-B2! ❤️) - All the .NET and third-party dependencies have been updated to their latest version. Commits viewable in [compare view](openiddict/openiddict-core@7.8.0...7.9.0). </details> Updated [OpenIddict.EntityFrameworkCore](https://github.com/openiddict/openiddict-core) from 7.8.0 to 7.9.0. <details> <summary>Release notes</summary> _Sourced from [OpenIddict.EntityFrameworkCore's releases](https://github.com/openiddict/openiddict-core/releases)._ ## 7.9.0 This release introduces the following changes: - A .NET 11 TFM was added to all the OpenIddict packages. - A vulnerability affecting the validation of authorization entries in the OpenIddict validation stack when token entry validation is not enabled was identified yesterday (thanks @DicksonWu654! ❤️) and fixed. > [!CAUTION] > Upgrading to OpenIddict 7.9.0 or 8.0.0 preview 6 is strongly advised. See GHSA-cxgj-hwwh-855g for more information. - The `OpenIddict.Client.WebIntegration` package now supports the Veriqa service (thanks @Ti-B2! ❤️) - All the .NET and third-party dependencies have been updated to their latest version. Commits viewable in [compare view](openiddict/openiddict-core@7.8.0...7.9.0). </details> Updated [OpenTelemetry.Exporter.InMemory](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.20.1 to 1.21.0. <details> <summary>Release notes</summary> _Sourced from [OpenTelemetry.Exporter.InMemory's releases](https://github.com/open-telemetry/opentelemetry-dotnet/releases)._ ## 1.21.0 For highlights and announcements pertaining to this release see: [Release Notes > 1.21.0](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/RELEASENOTES.md#1210). The following changes are from the previous release [1.21.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.21.0-rc.2). * NuGet: [OpenTelemetry v1.21.0](https://www.nuget.org/packages/OpenTelemetry/1.21.0) * `OpenTelemetryLoggerOptions` is now bound from the `Logging:OpenTelemetry` configuration section using the configuration binding source generator instead of reflection, making it fully trim and Native AOT compatible. An empty value for a boolean option is now ignored on all target frameworks rather than throwing on some, depending on the version of `Microsoft.Extensions.Configuration.Binder` in use. ([#8100](open-telemetry/opentelemetry-dotnet#8100)) * Fixed the self-diagnostics environment snapshot leaving a dangling comma in a redacted `OTEL_RESOURCE_ATTRIBUTES` value when it contained empty entries. ([#8104](open-telemetry/opentelemetry-dotnet#8104)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Api v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Api/1.21.0) * Update `System.Diagnostics.DiagnosticSource` dependency to `11.0.0` for all target frameworks. ([#8066](open-telemetry/opentelemetry-dotnet#8066)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Api/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Api.ProviderBuilderExtensions v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Api.ProviderBuilderExtensions/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.Console v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Exporter.Console/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.InMemory v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.InMemory/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.OpenTelemetryProtocol v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol/1.21.0) * Hardened the experimental disk retry feature. * **Breaking:** When running on .NET on non-Windows platforms, creating the ... (truncated) ## 1.21.0-rc.2 The following changes are from the previous release [1.21.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.21.0-rc.1). * NuGet: [OpenTelemetry v1.21.0-rc.2](https://www.nuget.org/packages/OpenTelemetry/1.21.0-rc.2) * Fixed an exception when downscaling empty exponential histogram buckets after a reset. ([#8064](open-telemetry/opentelemetry-dotnet#8064)) * Fixed tracing callbacks continuing after provider shutdown or disposal on older target frameworks. ([#8065](open-telemetry/opentelemetry-dotnet#8065)) * Fixed initialization failures when environment variable access is denied. Configuration reloads retain the last successful values when access is denied. ([#8070](open-telemetry/opentelemetry-dotnet#8070)) * Fixed a source, meter or legacy activity name with a trailing line feed matching a wildcard pattern which does not end in a wildcard. ([#8074](open-telemetry/opentelemetry-dotnet#8074)) * Fixed `OTEL_RESOURCE_ATTRIBUTES` values being decoded as form data, which changed a `+` to a space. Values are now only percent-decoded, as defined by the Resource SDK specification. ([#8074](open-telemetry/opentelemetry-dotnet#8074)) * Updated the schema URL of resources created by the SDK to use OpenTelemetry Semantic Conventions version `1.45.0`. ([#8079](open-telemetry/opentelemetry-dotnet#8079)) * Added support for batching the metric points exported by `PeriodicExportingMetricReader`. When a maximum export batch size is set, using the new constructor overload or `PeriodicExportingMetricReaderOptions.MaxExportBatchSize`, the metric points of each collection are split into batches of at most that many metric points, even if that splits up the metric points of a single metric. The batches are exported serially with the export timeout applying to each export. It can also be configured with the `OTEL_METRIC_EXPORT_MAX_BATCH_SIZE` environment variable. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) * Fixed `PeriodicExportingMetricReader` exporting a collection which was still in progress when `Shutdown()` timed out to its exporter after the exporter had been shut down. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) * Fixed `PeriodicExportingMetricReader` not making its final collection when `Shutdown()` was called before its background task had started running on platforms where threading is not available, such as browsers. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) ... (truncated) ## 1.21.0-rc.1 The following changes are from the previous release [1.20.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.20.1). * NuGet: [OpenTelemetry v1.21.0-rc.1](https://www.nuget.org/packages/OpenTelemetry/1.21.0-rc.1) * Fixed a race in the self-diagnostics sink dispatcher where disposing it while its pump thread was exiting could throw `ArgumentNullException` on .NET Framework. ([#7983](open-telemetry/opentelemetry-dotnet#7983)) * `SelfDiagnosticsOptions` is now automatically bound from the `OpenTelemetry:SelfDiagnostics` configuration section, when present. ([#8008](open-telemetry/opentelemetry-dotnet#8008)) * Fixed a race where collecting a metric with delta temporality concurrently with the creation of a new `MetricPoint` could reclaim the `MetricPoint` while it was being created, losing the measurement. ([#8019](open-telemetry/opentelemetry-dotnet#8019)) * Fixed a race where collecting a metric with delta temporality could export the same series twice in a single collection. ([#8019](open-telemetry/opentelemetry-dotnet#8019)) * Fixed wildcard matching timeouts that could prevent configured source, meter, legacy activity, or metric view patterns from matching. ([#8014](open-telemetry/opentelemetry-dotnet#8014)) * The timeout passed to `MetricReader.Collect()` (for example by `MeterProvider.ForceFlush()`), the `ExportTimeoutMilliseconds` of `PeriodicExportingMetricReader` and the `ExporterTimeoutMilliseconds` of `BatchExportProcessor<T>` are now made available to the exporter instead of being ignored once the export has started, so that the OTLP exporter can cancel an export which runs past the timeout. The `ExportTimeoutMilliseconds` of `PeriodicExportingMetricReader` now also limits exports which are not started by the reader itself, such as those of `MeterProvider.ForceFlush()`. ([#7996](open-telemetry/opentelemetry-dotnet#7996)) * Fixed a race where collecting a cumulative metric concurrently with the creation of a new `MetricPoint` could export a `MetricPoint` that was not yet fully initialized, could case a `NullReferenceException` when enumerating `Tags`. ([#8018](open-telemetry/opentelemetry-dotnet#8018)) * **Breaking Change** Dropped support for `net8.0` and `net9.0`. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Add support for .NET 11.0. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Added support for enabling `ActivitySource`s from configuration using the `Microsoft.Extensions.Diagnostics` tracing APIs introduced in .NET 11 (for example, `services.AddTracing(b => b.AddConfiguration(section))`). ... (truncated) ## 1.21.0-beta.1 The following changes are from the previous release [1.20.1-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/coreunstable-1.20.1-beta.1). * NuGet: [OpenTelemetry.Exporter.Prometheus.AspNetCore v1.21.0-beta.1](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus.AspNetCore/1.21.0-beta.1) * Fixed OpenMetrics scrape responses containing a `# UNIT` line whose unit is not an underscore-separated suffix of the metric family name (for example `auth.failedlogins` with the unit `logins`), which caused scrapers such as Prometheus to reject the whole response. The `# UNIT` line is now omitted for such metrics; exported metric names are unchanged. ([#7993](open-telemetry/opentelemetry-dotnet#7993)) * Fixed scrapes that negotiate different response formats within the `ScrapeResponseCacheDurationMilliseconds` window each triggering their own metrics collection. A collection now also writes the response for other formats whose scrapes arrived alongside a previous collection, so scrapes that keep arriving together are served from the cache. Fresh cached responses remain available while another format is serialized, even if that serialization fails. ([#7994](open-telemetry/opentelemetry-dotnet#7994)) * Fixed array- and map-valued attributes being serialized as the .NET type name (e.g. `System.Byte[]`, `System.Int32[]`) instead of being JSON-encoded as per the specification. `byte[]`-valued attributes are now Base64-encoded, and other array- and map-valued attributes are now JSON-encoded. ([#7694](open-telemetry/opentelemetry-dotnet#7694)) * Fixed arrays of string-valued key/value pairs being serialized as JSON arrays of strings instead of JSON objects. ([#7694](open-telemetry/opentelemetry-dotnet#7694)) * Fixed scrape clients which stop reading their response delaying other scrapes until `ScrapeResponseTimeoutMilliseconds` elapses. ([#8041](open-telemetry/opentelemetry-dotnet#8041)) * **Breaking Change** Dropped support for `net8.0` and `net9.0`. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Add support for .NET 11.0. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Fixed a scrape response containing the same series (metric name and labels) more than once, which causes Prometheus to reject the whole response, such as when metric or tag names are the same once escaped, tag names become the same when UTF-8 encoded, or the scope information is disabled. Duplicate series are now dropped, and a warning event is written. A metric which has the name of a sample that is generated for another one (for example `_sum` of a histogram) is now dropped, and a warning event is written. ([#8076](open-telemetry/opentelemetry-dotnet#8076)) ... (truncated) Commits viewable in [compare view](open-telemetry/opentelemetry-dotnet@core-1.20.1...core-1.21.0). </details> Updated [OpenTelemetry.Exporter.OpenTelemetryProtocol](https://github.com/open-telemetry/opentelemetry-dotnet) from 1.20.1 to 1.21.0. <details> <summary>Release notes</summary> _Sourced from [OpenTelemetry.Exporter.OpenTelemetryProtocol's releases](https://github.com/open-telemetry/opentelemetry-dotnet/releases)._ ## 1.21.0 For highlights and announcements pertaining to this release see: [Release Notes > 1.21.0](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/RELEASENOTES.md#1210). The following changes are from the previous release [1.21.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.21.0-rc.2). * NuGet: [OpenTelemetry v1.21.0](https://www.nuget.org/packages/OpenTelemetry/1.21.0) * `OpenTelemetryLoggerOptions` is now bound from the `Logging:OpenTelemetry` configuration section using the configuration binding source generator instead of reflection, making it fully trim and Native AOT compatible. An empty value for a boolean option is now ignored on all target frameworks rather than throwing on some, depending on the version of `Microsoft.Extensions.Configuration.Binder` in use. ([#8100](open-telemetry/opentelemetry-dotnet#8100)) * Fixed the self-diagnostics environment snapshot leaving a dangling comma in a redacted `OTEL_RESOURCE_ATTRIBUTES` value when it contained empty entries. ([#8104](open-telemetry/opentelemetry-dotnet#8104)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Api v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Api/1.21.0) * Update `System.Diagnostics.DiagnosticSource` dependency to `11.0.0` for all target frameworks. ([#8066](open-telemetry/opentelemetry-dotnet#8066)) See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Api/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Api.ProviderBuilderExtensions v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Api.ProviderBuilderExtensions/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Api.ProviderBuilderExtensions/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.Console v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.Console/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Exporter.Console/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.InMemory v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.InMemory/1.21.0) No notable changes. See [CHANGELOG](https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.21.0/src/OpenTelemetry.Exporter.InMemory/CHANGELOG.md) for details. * NuGet: [OpenTelemetry.Exporter.OpenTelemetryProtocol v1.21.0](https://www.nuget.org/packages/OpenTelemetry.Exporter.OpenTelemetryProtocol/1.21.0) * Hardened the experimental disk retry feature. * **Breaking:** When running on .NET on non-Windows platforms, creating the ... (truncated) ## 1.21.0-rc.2 The following changes are from the previous release [1.21.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.21.0-rc.1). * NuGet: [OpenTelemetry v1.21.0-rc.2](https://www.nuget.org/packages/OpenTelemetry/1.21.0-rc.2) * Fixed an exception when downscaling empty exponential histogram buckets after a reset. ([#8064](open-telemetry/opentelemetry-dotnet#8064)) * Fixed tracing callbacks continuing after provider shutdown or disposal on older target frameworks. ([#8065](open-telemetry/opentelemetry-dotnet#8065)) * Fixed initialization failures when environment variable access is denied. Configuration reloads retain the last successful values when access is denied. ([#8070](open-telemetry/opentelemetry-dotnet#8070)) * Fixed a source, meter or legacy activity name with a trailing line feed matching a wildcard pattern which does not end in a wildcard. ([#8074](open-telemetry/opentelemetry-dotnet#8074)) * Fixed `OTEL_RESOURCE_ATTRIBUTES` values being decoded as form data, which changed a `+` to a space. Values are now only percent-decoded, as defined by the Resource SDK specification. ([#8074](open-telemetry/opentelemetry-dotnet#8074)) * Updated the schema URL of resources created by the SDK to use OpenTelemetry Semantic Conventions version `1.45.0`. ([#8079](open-telemetry/opentelemetry-dotnet#8079)) * Added support for batching the metric points exported by `PeriodicExportingMetricReader`. When a maximum export batch size is set, using the new constructor overload or `PeriodicExportingMetricReaderOptions.MaxExportBatchSize`, the metric points of each collection are split into batches of at most that many metric points, even if that splits up the metric points of a single metric. The batches are exported serially with the export timeout applying to each export. It can also be configured with the `OTEL_METRIC_EXPORT_MAX_BATCH_SIZE` environment variable. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) * Fixed `PeriodicExportingMetricReader` exporting a collection which was still in progress when `Shutdown()` timed out to its exporter after the exporter had been shut down. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) * Fixed `PeriodicExportingMetricReader` not making its final collection when `Shutdown()` was called before its background task had started running on platforms where threading is not available, such as browsers. ([#8053](open-telemetry/opentelemetry-dotnet#8053)) ... (truncated) ## 1.21.0-rc.1 The following changes are from the previous release [1.20.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.20.1). * NuGet: [OpenTelemetry v1.21.0-rc.1](https://www.nuget.org/packages/OpenTelemetry/1.21.0-rc.1) * Fixed a race in the self-diagnostics sink dispatcher where disposing it while its pump thread was exiting could throw `ArgumentNullException` on .NET Framework. ([#7983](open-telemetry/opentelemetry-dotnet#7983)) * `SelfDiagnosticsOptions` is now automatically bound from the `OpenTelemetry:SelfDiagnostics` configuration section, when present. ([#8008](open-telemetry/opentelemetry-dotnet#8008)) * Fixed a race where collecting a metric with delta temporality concurrently with the creation of a new `MetricPoint` could reclaim the `MetricPoint` while it was being created, losing the measurement. ([#8019](open-telemetry/opentelemetry-dotnet#8019)) * Fixed a race where collecting a metric with delta temporality could export the same series twice in a single collection. ([#8019](open-telemetry/opentelemetry-dotnet#8019)) * Fixed wildcard matching timeouts that could prevent configured source, meter, legacy activity, or metric view patterns from matching. ([#8014](open-telemetry/opentelemetry-dotnet#8014)) * The timeout passed to `MetricReader.Collect()` (for example by `MeterProvider.ForceFlush()`), the `ExportTimeoutMilliseconds` of `PeriodicExportingMetricReader` and the `ExporterTimeoutMilliseconds` of `BatchExportProcessor<T>` are now made available to the exporter instead of being ignored once the export has started, so that the OTLP exporter can cancel an export which runs past the timeout. The `ExportTimeoutMilliseconds` of `PeriodicExportingMetricReader` now also limits exports which are not started by the reader itself, such as those of `MeterProvider.ForceFlush()`. ([#7996](open-telemetry/opentelemetry-dotnet#7996)) * Fixed a race where collecting a cumulative metric concurrently with the creation of a new `MetricPoint` could export a `MetricPoint` that was not yet fully initialized, could case a `NullReferenceException` when enumerating `Tags`. ([#8018](open-telemetry/opentelemetry-dotnet#8018)) * **Breaking Change** Dropped support for `net8.0` and `net9.0`. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Add support for .NET 11.0. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Added support for enabling `ActivitySource`s from configuration using the `Microsoft.Extensions.Diagnostics` tracing APIs introduced in .NET 11 (for example, `services.AddTracing(b => b.AddConfiguration(section))`). ... (truncated) ## 1.21.0-beta.1 The following changes are from the previous release [1.20.1-beta.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/coreunstable-1.20.1-beta.1). * NuGet: [OpenTelemetry.Exporter.Prometheus.AspNetCore v1.21.0-beta.1](https://www.nuget.org/packages/OpenTelemetry.Exporter.Prometheus.AspNetCore/1.21.0-beta.1) * Fixed OpenMetrics scrape responses containing a `# UNIT` line whose unit is not an underscore-separated suffix of the metric family name (for example `auth.failedlogins` with the unit `logins`), which caused scrapers such as Prometheus to reject the whole response. The `# UNIT` line is now omitted for such metrics; exported metric names are unchanged. ([#7993](open-telemetry/opentelemetry-dotnet#7993)) * Fixed scrapes that negotiate different response formats within the `ScrapeResponseCacheDurationMilliseconds` window each triggering their own metrics collection. A collection now also writes the response for other formats whose scrapes arrived alongside a previous collection, so scrapes that keep arriving together are served from the cache. Fresh cached responses remain available while another format is serialized, even if that serialization fails. ([#7994](open-telemetry/opentelemetry-dotnet#7994)) * Fixed array- and map-valued attributes being serialized as the .NET type name (e.g. `System.Byte[]`, `System.Int32[]`) instead of being JSON-encoded as per the specification. `byte[]`-valued attributes are now Base64-encoded, and other array- and map-valued attributes are now JSON-encoded. ([#7694](open-telemetry/opentelemetry-dotnet#7694)) * Fixed arrays of string-valued key/value pairs being serialized as JSON arrays of strings instead of JSON objects. ([#7694](open-telemetry/opentelemetry-dotnet#7694)) * Fixed scrape clients which stop reading their response delaying other scrapes until `ScrapeResponseTimeoutMilliseconds` elapses. ([#8041](open-telemetry/opentelemetry-dotnet#8041)) * **Breaking Change** Dropped support for `net8.0` and `net9.0`. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Add support for .NET 11.0. ([#6899](open-telemetry/opentelemetry-dotnet#6899)) * Fixed a scrape response containing the same series (metric name and labels) more than once, which causes Prometheus to reject the whole response, such as when metric or tag names are the same once escaped, tag names become the same when UTF-8 encoded, or the scope information is disabled. Duplicate series are now dropped, and a warning event is written. A metric which has the name of a sample that is generated for another one (for example `_sum` of a histogram) is now dropped, and a warning event is written. ([#8076](open-telemetry/opentelemetry-dotnet#8076)) ... (truncated) Commits viewable in [compare view](open-telemetry/opentelemetry-dotnet@core-1.20.1...core-1.21.0). </details> Updated [xunit.v3](https://github.com/xunit/xunit) from 4.0.2 to 4.0.3. <details> <summary>Release notes</summary> _Sourced from [xunit.v3's releases](https://github.com/xunit/xunit/releases)._ No release notes found for this version range. Commits viewable in [compare view](https://github.com/xunit/xunit/commits). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>






Summary
ShowOnFocusopened the tooltip on everyfocusin, including the focus the browser restores when you switch back to the tab and the focus a dialog restores to its trigger after closing. Nothing then hovered or moved focus away, so those tooltips stayed open until the user clicked elsewhere.The tooltip now opens on focus only when the focused element matches
:focus-visible, the browser's own signal for keyboard focus. MUI's Tooltip uses the same check.Fixes #13553
Fixes #4319
Related to #7962, #8207
Changes
MudTooltip: onfocusin, ask the browser whether the focused element matches:focus-visible(newmudElementRef.isFocusVisible) and open only if it does. For text inputs,isFocusVisiblealso returns false when a pointer press moved focus there (recorded per element with capturekeydown/pointerdown/focusinlisteners; Ctrl/Alt/Meta chords ignored). A version counter drops a result that arrives after focus has left. No interop call whenShowOnFocusis off, the tooltip is already open, or it is disabled or has nothing to show.ShowOnClicknow opens on the first click. Before, the click's focus opened the tooltip and the pointer-up toggle closed it again.ShowOnFocusXML docs and the Activation Events docs describe the:focus-visiblebehavior. The example's "Focus the element" button, which focused by script after a click, is replaced with a Tab hint.ShowOnClickfirst click. Existing focus tests set the interop result explicitly.Behavior change
FocusAsync()from a button click, no longer opens the tooltip. Keyboard focus still does. To show a tooltip from code, set or bindVisible.:focus-visible.:focus-visible, so for text inputs the tooltip also checks which input moved focus there. Focus from a click or tap doesn't open it, even if the user then types; returning to the browser tab keeps the original focus type. Tab-key focus still opens it. Hover still opens it (Which will almost always fire before and after a click)Visual Evidence
Viewer (WASM), Chrome 155, 1280x900. Measured results below; before/after screenshots will be added as attachments.
ShowOnClickfirst click (Chrome, Firefox)Tested With
dotnet test --project src/MudBlazor.UnitTests/MudBlazor.UnitTests.csproj(full suite: 0 failed; ToolTip filter 57/57; ToolTip/TooltipViewer/Tabs/DynamicTabs/ColorPicker/Table/Dialog/FocusTrap/ButtonGroup/ChartToolTip filter 554/554). New tests fail on dev.dotnet test --project src/MudBlazor.UnitTests.Docs/MudBlazor.UnitTests.Docs.csproj -p:GenerateDocsTests=true(1423/1423)dotnet buildof the Viewer (Bun lint, tsc, bun tests 53/53) and ofsrc/MudBlazorfor net8.0, net9.0, net10.0: 0 warningsdotnet format whitespace --folder --include <changed files>mudElementRefcall counts were identical on 34 Viewer routes except the newisFocusVisible, and console errors were identical.Notes
:focus-visiblecheck is a JS call (localhost median 12.9 ms before, 13.7 ms after).:focus-visible(Chrome does), so the tooltip follows each browser's focus ring.:focus-visibleis unsupported or a staleMudBlazor.min.jslacks the new function, Release builds fall back to the previous open-on-every-focus behavior.VisibleChangedcan fire after removal (same end state as dev); after a dropped Server connection, a stale tooltip can open when the interop call times out instead of immediately as on dev.MudTooltip.razor.cs.-- Coded by Codebringer / AI
-- Codebringer for versile2
-- versile2 requested changes