Skip to content

Dropdown does not respect boundary in strict mode (react 18) #6284

@jannec22

Description

@jannec22

Prerequisites

Describe the bug

When rendering Dropdown inside React.StrictMode, Dropdown.Menu does not respect horizontal boundary, and causes horizontal overflow.

Expected behavior

Dropdown should work properly inside Strict Mode

To Reproduce

start a fresh create-react-app project, install react18-rc.1, bootstrap 5, and react-bootstrap 2.X
render Dropdown inside StrictMode close to the edge of the screen.

Reproducible Example

see sandbox

Screenshots

with strict mode:
image

without strict mode:
image

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Chrome

What version of React-Bootstrap are you using?

2.2.0

What version of Bootstrap are you using?

5.1.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions