Skip to content

[Bug]: The PopoverSurface doesn't close automatically when the Popover is used with closeOnScroll #28938

Description

@zhangxuan615

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz
    Memory: 10.93 GB / 31.80 GB
  Browsers:
    Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.54)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/inspiring-fast-5jm9wc?file=/example.tsx

Bug Description

Actual Behavior

  1. the PopoverSurface doesn't close when scrolling by dragging the scroll bar, not rolling the wheel or by scrolling by typing up/down button on the keyboard.
  2. the PopoverSurface doesn't close once the Popoveronce scrolling outside of Popover trigger and keep scrolling.
    steps to repro:
    2.1. click the trigger to open the PopoverSurface. (keep the mouse hover on the trigger)
    2.2. scroll the wheel of mouse coninously to drive the cursor walking away from the trigger.
    2.3. you can still see the PopoverSurface open when you stop scrolling although the PopoverSurface was supposed to be closed.

Expected Behavior

both should close PopoverSurface

Logs

No response

Requested priority

High

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions