You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking on InfoLabel within a PromptInput scrolls the page up to the top with popover open. Popover (what's used in InfoButton) auto focuses when opened. This is done through a useEffect, but the positioning API allows repositioning many times per render, so that mismatch plus focusing right away on the first focusable element of the popover causes the jump.
Disabling autofocus and focusing through a callback ref works as a workaround, but using positioning: fixed does not. Here's the workaround:
Here is the current behavior if you click on an InfoLabel to open the popover within a PrompInput:
Expected Behavior
The InfoLabel click should not jump/scroll up the page to the top when used within a PromptInput and when it shows a popover upon click. It should simply open up the popover and stay there.
Component
InfoLabel
Package version
9.49.2
React version
18.3.0
Environment
Current Behavior
Clicking on InfoLabel within a PromptInput scrolls the page up to the top with popover open. Popover (what's used in InfoButton) auto focuses when opened. This is done through a useEffect, but the positioning API allows repositioning many times per render, so that mismatch plus focusing right away on the first focusable element of the popover causes the jump.
Disabling autofocus and focusing through a callback ref works as a workaround, but using
positioning: fixed
does not. Here's the workaround:Here is the current behavior if you click on an InfoLabel to open the popover within a PrompInput:
Expected Behavior
The InfoLabel click should not jump/scroll up the page to the top when used within a PromptInput and when it shows a popover upon click. It should simply open up the popover and stay there.
Reproduction
https://stackblitz.com/run?file=src%2Fexample.tsx
Steps to reproduce
actions
prop so it shows up within the PromptInput boxHere is the repro demo:
Are you reporting an Accessibility issue?
no
Suggested severity
Medium - Has workaround
Products/sites affected
loop.microsoft.com
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: