Skip to content

[Bug]: Combobox options list overflows the screen top under small viewports #27565

Description

@RamyRafik

Library

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

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 Intel(R) Xeon(R) W-2255 CPU @ 3.70GHz
    Memory: 37.63 GB / 63.69 GB
  Browsers:
    Edge: Spartan (44.22621.1555.0), Chromium (111.0.1661.62)
    Internet Explorer: 11.0.22621.1

Are you reporting Accessibility issue?

None

Reproduction

https://codesandbox.io/s/runtime-river-pg2kgy?file=/example.tsx

Bug Description

Actual Behavior

Currently, the listbox (Options list) has a max-height of 80vh. This would work if the Combobox is at the top or bottom of the page, but doesn't work if it's in the middle.
Under small viewports (where the listbox can't open to the bottom or right), the listbox would overflow the screen top edge.
image

Expected Behavior

The listbox should be always clamped by the screen edges.

Logs

No response

Requested priority

High

Products/sites affected

PowerApps

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

Assignees

No one assigned

    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