Skip to content

Tab Overflow Dropdown doesn't collide with edge of screen #883

@Millcrest-Corey

Description

@Millcrest-Corey

Describe the bug
The new tab overflow dropdown added in v4.0.0 doesn't collide with the right or bottom of the screen. It also does not have the correct zIndex when used on a floating panel (shows behind the panel).

To Reproduce

Collision issue:

  1. Go to react/basic example
  2. Drag multiple panels over to the right section
  3. Resize the right section so it's very thin
  4. Open the tab overflow dropdown

zIndex issue:

  1. Go to react/floating-groups example
  2. Open the tab overflow dropdown

Expected behavior
The dropdowns offset should take the window size into account. Also if the dropdown is taller than the window height (when there's a lot of tabs in the overflow) then it should probably collide with the bottom as well and show a scrollbar.

When used on a floating panel it should be shown in-front of the panel.

Screenshots

Image

Image

Desktop

  • Testing in Firefox (136.0.1), Edge (134.0) and Chrome (134.0)

Additional context
The popover component in the radix-ui library has very good collision options: https://www.radix-ui.com/primitives/docs/components/popover

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions