Repository navigation
[popover][menu] Fix hover-out animations when switching between detached triggers - #4261
Conversation
commit: |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex ReviewOverviewThis branch fixes the detached-trigger hover animation races and adds a Popover-only hover handoff grace window so quick re-entry or trigger-to-trigger moves can reopen without waiting through the full hover delay. The latest changes also scope that grace behavior away from Tooltip and add regression coverage for controlled, canceled, and delayed-close paths. Findings (None)No blocking issues found in this patch. Confidence: 4/5High confidence based on a full pass over the Notes
The absolute delta is roughly |
|
In some cases, traversing from the popup to a different trigger fails to open it. Similar issue when there are gaps between. Tooltip handles this but it uses the delay provider logic iirc. Screen.Recording.2026-03-05.at.7.46.16.pm.mov |
|
I added a period (400ms, matching TooltipProvider) during which |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c00eb9198b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 03b32a4f4d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
After hovering and switching to a new trigger, the exit animation is incorrectly instant |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92d5ef810f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex ReviewOverviewThis branch fixes the detached-trigger exit-animation race and adds a short hover handoff window so Popover and Menu can reopen immediately after a recent hover close. The later revisions also narrowed that behavior away from Tooltip and cleaned up the shared hover helpers, but there is still one controlled-mode gap in the new committed-close bookkeeping. Findings1. 🔴 [Blocking] Controlled no-op closes are still counted as committed closesImpact: In controlled Popover/Menu/NavigationMenu usage, a consumer can keep the popup open by leaving the controlled Evidence: Recommendation: After 2. 🟡 [Non-blocking] Committed-close signaling is still duplicated in both hover hooksImpact: The reference and floating hover hooks still each wrap Evidence: Recommendation: Once the controlled-close bug is fixed, consider pulling the close-and-emit behavior behind one shared helper so the tree signal and committed-close criteria live in a single place. 3. ℹ️ [Informational] The added delay-bypass branch looks cheap in isolationImpact: I did not see evidence that the new Evidence: Focused micro-check of the new delay-bypass branch versus
That synthetic delta is roughly Recommendation: No perf change needed from this measurement alone; I would just keep the benchmark in mind if more logic gets added to the hover-move path. Confidence: 3/5Moderate confidence based on a full Notes
|
This was done intentionally to improve UX by reducing flickering. The default delay is short enough so it's not obvious and still enough to prevent the tooltip from closing when moving the mouse from one trigger to another.
Fixed by explicitly enabling this feature on the Popover only. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 167a5173ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cec53f14a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex ReviewOverviewThis branch hardens the shared hover-close bookkeeping used by floating interactions and wires the grace-period behavior into popover and menu handoffs, including detached-trigger animation cleanup. It also changes the popover hover close default to Findings (None)No blocking issues found in this patch. Confidence: 4/5High confidence based on a full-branch pass over the touched hover/popover/menu code paths plus targeted validation of the updated JSDOM and Chromium suites covering |
Codex ReviewOverviewThis branch fixes the detached-trigger exit-animation race and adds a hover-close grace window so popovers and menus can reopen immediately during quick handoffs. It also moves the shared hover-close bookkeeping into the reference and popup hooks and adds targeted regression coverage around those paths. Findings1. 🔴 [Blocking] External controlled closes can still finalize a stale hover closeImpact: In controlled Popover/Menu usage, a parent that ignores a hover-close request and later flips Evidence: Recommendation: Only keep 2. 🟡 [Non-blocking] The grace window now overrides
|
| Ref | Mean (ms) | p50 (ms) | p95 (ms) | Sample size |
|---|---|---|---|---|
upstream/master equivalent (no guard) |
2.13 | 1.98 | 3.52 | 10 |
| PR head equivalent guard | 20.39 | 20.11 | 22.87 | 10 |
The absolute delta is roughly 3.7ns per call in a tight loop, so the added guard itself does not look materially expensive in isolation.
flaviendelangle
left a comment
There was a problem hiding this comment.
PR #4261 Review Summary
[popover][menu] Fix hover-out animations when switching between detached triggers — 24 files, +1531/-97
Critical Issues (0)
None found.
Important Issues (5)
-
Stale
trigger-changeclear ordering is untested — PopoverStore.ts:170-174. Tests only observe DOM afterflushSync; a regression that moves the clear afterflushSyncwould still pass. Add an ordering-sensitive assertion (e.g. captured store state) or a unit test exercising the synchronous order. (pr-test-analyzer) -
Verify Menu has the symmetric store-layer fix — MenuPositioner.tsx gets the positioner guard but I see no equivalent of
PopoverStore.setOpen'sinstantTypepre-clear in the Menu store. The Menu regression tests may currently pass by timing luck. Confirm/add the symmetric clear. (pr-test-analyzer) -
Consumer-cancel path silently kills hover handoff — useHoverInteractionSharedState.ts:206-211. When
onOpenChangecallspreventDefault(), the function returns with nopendingHoverClose, no grace, no event, no log. Add alogForDebuggingso a developer canceling close in dev can see why the handoff was suppressed. (silent-failure-hunter) -
pendingHoverClosecleared before the open check — useHoverInteractionSharedState.ts:200-204. A reentrant call whileopen === falsesilently discards a still-pending close, soemitCommittedHoverCloseno-ops andfloating.closedis never emitted. Either clear after confirmingopen, or callemitCommittedHoverClosefirst. (silent-failure-hunter) -
New
useHoverInteractionSharedState.test.tslacksdescribe.skipIf(!isJSDOM)— useHoverInteractionSharedState.test.ts:5. Every other unit test infloating-ui-react/hooks/(e.g.useHoverReferenceInteraction.test.tsx:11) wraps with this guard. (code-reviewer)
Suggestions
Code / silent failures
- Add
logForDebuggingwhen the three-part positioner guard rejects in PopoverPositioner.tsx:120-131 / MenuPositioner.tsx:250-258 — especially thedomReferenceElement !== triggerOnSwitchbranch. - The
queueMicrotaskdeferred-drop fallback at useHoverInteractionSharedState.ts:229-236 dropspendingHoverCloseinvisibly when consumers defer viastartTransition. Consider routing throughemitCommittedHoverCloseor surfacing a debug log; also clearpendingHoverCloseGracefor robustness. - Wrap the
instance.handler(event)call in useHoverFloatingInteraction.ts:241 in try/catch +finally { clearPointerEvents() }so a thrown safePolygon handler doesn't leavepointer-events: nonestuck. - Use realm-safe
ownerWindow(node).queueMicrotaskrather than the global, matching CheckboxRoot.tsx:364. - Unify the deferred-commit fallback in useHoverReferenceInteraction.ts:196 on
useIsoLayoutEffectinstead ofReact.useEffectso reference/floating sides emitfloating.closedin the same phase. (Per AGENTS.md: preferuseIsoLayoutEffect.) - Redundant
&& shouldOpenguard at useHoverReferenceInteraction.ts:313 — obscures intent; either drop it or move outside the merged branch.
Tests
- Rewrite the flaky Menu "bypasses open delay" test at MenuRoot.detached-triggers.test.tsx:750-801 using
clock.withFakeTimers()like its Popover analogue. - Replace hand-rolled
createMockStorein useHoverInteractionSharedState.test.ts:91-137 with a realFloatingRootContext(or throw on unhandledselectkeys) so future additions don't silently bypass coverage. - Remove the
.catch(() => undefined)onanimation.finishedinwaitForAnimationsFinished— it swallows signal. - Add coverage for: controlled
open={false}flip after a trigger switch (clean isolation of fix #2), andPortal keepMountedsodata-instantdoesn't stick across cycles. - Mirror regression tests for Tooltip/PreviewCard, which share the same trigger-change pattern.
Comments
// Layout phase so pointer-event mutations are cleaned up before paint.in useHoverFloatingInteraction.ts is now stale — the effect also callsemitCommittedHoverClose. Rewrite to cover both behaviors.// Popover's internal 'flushSync' may have already synced…couples the generic hook to a specific consumer — generalize the wording.// Keep positioner transition behavior aligned with Popover…in MenuPositioner.tsx will rot if Popover diverges; replace with the actual WHY (stale callback / wrong cycle).- Tighten
// When the current trigger element changes, enable transitions on the positioner temporarilyinPopoverPositioner.tsx— the effect now also gatesinstantTyperestoration. - All other added comments (
closeHoverPopup,emitCommittedHoverClose, theperformance.nowrealm choice,HOVER_CLOSE_GRACE_PERIOD,constants.tsclose-delay rationale) are good and should stay.
Strengths
- Clean decomposition into shared helpers (
closeHoverPopup,emitCommittedHoverClose,clearRecentHoverClose,closeWithOptionalDelay) — matches AGENTS.md "avoid duplicating logic." openCycleRef+domReferenceElementtriple-guard in both positioners is the right shape and applied consistently across components.- Strongest test: PopoverRoot.detached-triggers.test.tsx:844 directly exercises race #2 by capturing animations before unhover.
- Uses
useStableCallbackcorrectly for handlers,describe.skipIf(isJSDOM)is well-targeted (not overused), noflushMicrotasksafterawait render(...). - Comment hygiene overall is strong — non-obvious invariants (controlled-consumer race, realm-agnostic clock, flushSync vs startTransition tradeoff) are well documented.
- Sync'd docs + JSDoc updates for the new
delay-bypass behavior. isHoverOpenEventcorrectness tightening to=== true.
Recommended Action
- Address importants #1–#5 (mostly small additions: ordering test, Menu store parity check, two
logForDebuggingcalls, onedescribe.skipIf). - Apply the comment tightening list — small text-only changes.
- Consider the test additions for keepMounted / controlled-flip / Tooltip-PreviewCard mirror as follow-up.
- Re-run
pnpm test:chromium PopoverRoot --no-watchandpnpm test:chromium MenuRoot --no-watchafter edits.
Code Review (GPT-5.5)Request changes 🔴, because the +548B gzip increase appears to come from the new hover-close grace-window feature rather than the actual detached-trigger animation fix. 1. Bugs / Issues1. 🔴 Drop the grace-window machinery from this bug fix (blocking)The PR’s core bug is stale
import * as ReactDOM from 'react-dom';
export const HOVER_CLOSE_GRACE_PERIOD = 400;
lastHoverCloseTime: number;
pendingHoverClose: MouseEvent | null;
pendingHoverCloseGrace: boolean;
export function closeHoverPopup(...) {
...
ReactDOM.flushSync(() => {});
...
queueMicrotask(() => {
...
});
}
const open = store.useState('open');
React.useEffect(() => {
if (!hoverCloseGracePeriod || !open) {
return;
}
clearRecentHoverClose(instance);
}, [hoverCloseGracePeriod, instance, open]);
function shouldIgnoreOpenDelayAfterHoverClose(...) {
return (
!isOpen &&
(hoverCloseGracePeriod ?? 0) > 0 &&
instance.lastHoverCloseTime !== 0 &&
performance.now() - instance.lastHoverCloseTime <= hoverCloseGracePeriod!
);
}This adds shared state fields, Fix: remove 2. Bundle AssessmentCI reports Expected small-shape patch:
3. Test Coverage AssessmentThe detached-trigger animation regressions are the right tests to keep. The delay-bypass/grace-window tests are evidence of a new behavior, not necessary coverage for the reported animation race, so removing that behavior should also remove the need for those tests. |
043ffda to
c12eb8e
Compare
|
I've force-pushed this down to just the animation fix, rebased on current master. Previous head was Why@atomiks was right that the hover-close grace window is a separate behavior change riding along with a bug fix. It's now out of this PR. What's left is ~40 lines of production code with no API change, no new public behavior, and no meaningful bundle cost. What's leftTwo races that let
Still reproducible on master, and not only in Edge — it reproduces in Chromium too. On the review feedback@flaviendelangle's point about the ordering being untested was correct, and worse than stated: the old test for the store fix passed on unfixed master. It asserted on the DOM through
On the question of Menu store parity: Menu only needs the positioner guard. The grace windowParked on a local branch rather than dropped. It'll come back as its own PR once these are settled:
Also worth re-checking whether the original handoff gap still reproduces on today's master before rebuilding it — a fair amount of hover-handoff work has landed since March (#4446, #4990, #5159). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c12eb8e531
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A controlled consumer can accept a hover close but commit `open={false}`
later, for example from a transition or an async confirmation. Until it does,
the effective `open` selector (`openProp ?? open`) still reads `true`, so a
trigger-switch animation finishing inside that window restored
`trigger-change`. The eventual commit arrives through the prop rather than
`setOpen`, so nothing cleared it again and the whole exit transition was
skipped.
The store already distinguishes the requested open state (`state.open`, set
when the close is requested) from the effective one, so the restoration now
requires the requested state to be unchanged since the switch was scheduled.
This also leaves programmatically-opened controlled popups alone, where
`state.open` is `false` for the entire open cycle.
Reported by Codex on mui#4261. The race predates this branch — verified failing
on master — and is the same class as the two already fixed here.
Co-Authored-By: Claude Opus 5 <[email protected]>
|
Confirmed and fixed in d709f72. I reproduced it: controlled One correction to the report: this isn't caused by the new guard, and it isn't new. The same repro fails identically on The fixThe store already distinguishes the two open states: const requestedOpenOnSwitch = store.state.open;
runOnceAnimationsFinish(() => {
if (
store.select('open') &&
store.state.open === requestedOpenOnSwitch &&
floatingRootContext.select('domReferenceElement') === triggerOnSwitch
) {
store.set('instantType', 'trigger-change');
}
}, abortController.signal);Comparing against the value captured at schedule time rather than testing Regression tests added for both Popover and Menu, each verified to fail without the guard. On
|
| Guard | Covered by |
|---|---|
PopoverStore pre-clear |
2 Popover tests |
store.select('open') |
1 Popover + 1 Menu test |
state.open === requestedOpenOnSwitch |
1 Popover + 1 Menu test |
| same-trigger check | none — kept as a cheap precondition, happy to drop it |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d709f72dab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 323c1af14a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
When `openOnHover` is enabled, moving between detached triggers sets `instantType="trigger-change"` so the popup repositions without animating a full close/open cycle. Two races let that state leak into the following close, suppressing the exit animation. 1. `PopoverStore.setOpen` `flushSync`es the close render *before* it resets `instantType`, so the first closing frame inherits `trigger-change` and renders with `data-instant`. Clear it before the flush instead. 2. The positioner restores `trigger-change` from a `runOnceAnimationsFinish` callback that can fire after a close has already started, or after the popup reopened on a different trigger. Guard the restoration on the open cycle, the open state, and the trigger still owning the popup. Menu shares race 2 and gets the same positioner guard. It does not share race 1 because `MenuRoot.setOpen` does not `flushSync`, so its state update and `instantType` reset batch into one render. Regression tests capture `instant` on every closing render, since a later render clears the stale value before the DOM can be asserted on. Co-Authored-By: Claude Opus 5 <[email protected]>
Popover and Menu had the same trigger-switch effect copy-pasted, kept in sync only by a "keep aligned with Popover" comment. They now share `useTriggerSwitchTransition`. Also drops the open-cycle counter the guard originally carried. It was meant to catch a stale callback surviving into a later open, but instrumenting the callback showed that never happens: a close either re-runs the effect and aborts the callback, or the callback fires while `open` is already false and the existing check discards it. Verified that every remaining guard has a test that fails without it, and adds the close-and-reopen-on-the-same-trigger case the counter was meant to cover. Co-Authored-By: Claude Opus 5 <[email protected]>
A controlled consumer can accept a hover close but commit `open={false}`
later, for example from a transition or an async confirmation. Until it does,
the effective `open` selector (`openProp ?? open`) still reads `true`, so a
trigger-switch animation finishing inside that window restored
`trigger-change`. The eventual commit arrives through the prop rather than
`setOpen`, so nothing cleared it again and the whole exit transition was
skipped.
The store already distinguishes the requested open state (`state.open`, set
when the close is requested) from the effective one, so the restoration now
requires the requested state to be unchanged since the switch was scheduled.
This also leaves programmatically-opened controlled popups alone, where
`state.open` is `false` for the entire open cycle.
Reported by Codex on mui#4261. The race predates this branch — verified failing
on master — and is the same class as the two already fixed here.
Co-Authored-By: Claude Opus 5 <[email protected]>
…losed Three more stale-instant reports on this PR, all reproduced: - The popup closes and reopens on the same trigger mid-exit. The positioner stays mounted and the trigger is unchanged, so nothing re-runs the effect to cancel the pending restoration and the new open cycle inherits it. - A controlled consumer switches triggers and then closes entirely through props. Neither transition passes through `setOpen`, so nothing clears the `trigger-change` the switch legitimately restored. - A controlled root opened and switched purely by props, then hovered out with a deferred commit. The requested-open comparison added in the previous commit reads `false === false` and lets the restoration through. Rather than adding a fourth condition to the restoration, the two underlying invariants are now enforced directly: - `trigger-change` describes a popup moving between triggers, which only has meaning while open. The stores' `instantType` selector drops it when the popup is closed, so no close path can inherit it, including those that never reach `setOpen`. - Closing cancels any pending restoration, so a reopen starts clean. This subsumes the earlier fixes. `PopoverStore.setOpen` no longer needs to pre-clear `instantType` before its `flushSync`, and the restoration no longer needs the open-cycle, requested-open, or same-trigger conditions. The remaining `open` check prevents writing state that would outlive the close. Co-Authored-By: Claude Opus 5 <[email protected]>
323c1af to
86cb0fa
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86cb0fa422
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Two follow-ups on the previous commit, both reproduced: - Masking `trigger-change` while closed left the value stored. A controlled reopen on the same trigger changes only `openProp`, so neither the switch effect nor `setOpen` runs again to replace it, and the selector starts exposing the old value against the new cycle — suppressing its entrance transition instead of its exit. - The trigger element can change while a closing popup is still mounted, when a trigger is replaced by a new element. There is no move to animate, and the cancellation effect has already run for that commit, so a restoration scheduled there would survive into whatever opens next. Closing now clears the stored value as well as cancelling any pending restoration, and a switch is only scheduled while the popup is open. The clear has to read `store.state.instantType` rather than the selector: the selector hides `trigger-change` precisely when the popup is closed, which is when the clear needs to see it. Co-Authored-By: Claude Opus 5 <[email protected]>
The "controlled close commits late" tests only asserted that no closing
render carried `trigger-change`, so they would pass without testing anything
if the switch to trigger 2 stopped happening or the restoration stopped
landing before the deferred `open={false}`.
They now also assert that trigger 2 took over the popup and that
`trigger-change` was restored while the close was pending.
When
openOnHoveris enabled, moving between detached triggers clearsinstantTypeso the positioner can animate to the new trigger, then sets it totrigger-changeonce that move finishes. That value could outlive the open cycle that set it. When it leaked into a close, the popup rendereddata-instantand skipped its exit transition, so it disappeared instead of fading out. When it leaked into a later open, the entrance transition was skipped instead.Root cause
Nothing tied
trigger-changeto the open cycle that set it, and several paths let it reach a render it didn't belong to:PopoverStore.setOpenflushSynces a hover close before it resetsinstantType, so the closing render inheritedtrigger-change. Menu doesn'tflushSynchere, so its state update and reset batch into a single render.runOnceAnimationsFinishcallback that restorestrigger-changecould fire after a close had already started.setOpen. A controlled consumer committingopen={false}, whether directly or after deferring a hover close, goes straight through the prop, so nothing reset the value.openProp, so a value stored during the previous cycle came back.Fix
Instead of guarding each path separately, the fix enforces three invariants:
instantTypeselector hidestrigger-changewhile the popup is closed (PopoverStoreandMenuStore). It is derived at render time, so no closing render can show it, whichever path closed the popup.The trigger-switch effect was copy-pasted between
PopoverPositionerandMenuPositioner. Both now use a shareduseTriggerSwitchTransitionhook.There is no API change. Bundle size: +239B parsed, +38B gzip.
Tests
The regression tests record
instanton every closing render rather than asserting on the DOM, because a later render clears the stale value beforewaitForcan observe it. They run in Chromium only, since they need real CSS transitions.flushSyncthe close)Removing the stored-value clear on its own makes the prop-driven test fail on its reopen assertion.
The two "controlled close commits late" tests also assert that trigger 2 took over the popup and that
trigger-changewas restored before the lateopen={false}landed, so they can't pass without exercising the race.Two guards have no test:
flushSynccan flush pending passive effects before running the callback. A controlled close committed there would let the restoration writetrigger-changeafter the close had cleared it. That ordering is inferred from React's source and hasn't been reproduced, so the check is kept as a cheap safeguard.Scope
Earlier revisions of this PR also carried a hover-close grace window that let a popup reopen without waiting for
delayright after a hover close. It has been split out: it's a separate behavior change with its own bundle cost and open design questions, and this fix doesn't need it. As a result, the handoff issue it targeted (moving from the popup to a different trigger sometimes doesn't open it) is not fixed here.Reproduction
Originally reported on Edge on Mac, but it reproduces in Chromium as well.