microsoft / microsoft/fluentui

Converged Popover: nested popover is not updating position on scrolling container

Open
#21,457 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Popover Fluent UI react-components (v9) Resolution: Soft Close
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Environment Information
  • Package version(s): (fill this out)
  • Browser and OS versions: (fill this out if relevant)
Please provide a reproduction of the bug in a codepen:

codesandbox: https://codesandbox.io/s/sad-haze-mzy63?file=/example.tsx

Actual behavior:

When scrolling the contaner (green box), the nested popover element is not updating its position to follow trigger:
Screenshot 2022-01-26 at 16 35 46

This happens because the trigger is rendered outside of the scroll container, so popperjs is not able to identify the scroll container as the trigger's scrollable parent: https://github.com/floating-ui/floating-ui/issues/1267

Expected behavior:

In @fluentui/react-northstar, we had the similar issue. It was solved by adding a prop to dismiss popover on scrolling the container element (PR #21453 ).

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No) no

Requested priority: (Blocking, High, Normal, Low) low

Products/sites affected: (if applicable)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and trace the Converged Popover behavior when the green container scrolls. Compare the proposed behavior with the related @fluentui/react-northstar solution in PR #21453; done means the nested popover responds correctly to scrolling, with the behavior covered by an appropriate regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.