Skip to content

Bug - Dropdown/Popper - Alignment is off after multiple opens #11701

@wise-king-sullyman

Description

@wise-king-sullyman

Describe the problem
Dropdowns are positioning incorrectly after the first open, this is visible both on org and on console.redhat.com.

It appears to be related to the dropdown being near the right edge of the screen and the popper being passed a right aligned position value.

How do you reproduce the problem?

  1. go to patternfly.org
  2. open the version switcher
  3. see that it is positioned properly
  4. close it
  5. open it again
  6. see that it is positioned a few px to the left
  7. repeat steps 4-6 to see that it continues to position incorrectly
  8. refresh the page and repeat from step 2 to see that it is a consistent behavior

Expected behavior
It always positions correctly, not just on the first open.

Screenshots
HCC on first dropdown open:

Image

Second open (and all subsequent opens afterward):

Image

The same thing is happening for the version switcher on org:

Image Image

What is your environment?

  • OS: Mac OS
  • Browser: all
  • Version: started with at least PF 5.4.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions