Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wise-king-sullyman opened this issue Mar 20, 2025 · 1 comment · Fixed by #11846
Closed

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

wise-king-sullyman opened this issue Mar 20, 2025 · 1 comment · Fixed by #11846
Assignees

Comments

@wise-king-sullyman
Copy link
Contributor

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
@thatblindgeye
Copy link
Contributor

We should double check whether this is happening in an RTL enabled Page, when the Dropdown menu is both left and right aligned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants