Skip to content
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

Some selects get rendered in the wrong position for a flash second #1102

Closed
KKoukiou opened this issue Jun 7, 2023 · 2 comments
Closed

Some selects get rendered in the wrong position for a flash second #1102

KKoukiou opened this issue Jun 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@KKoukiou
Copy link
Collaborator

KKoukiou commented Jun 7, 2023

Screencast.from.2023-06-07.11-28-35.webm
@KKoukiou KKoukiou added the bug Something isn't working label Jun 7, 2023
@garrett
Copy link
Member

garrett commented Jun 7, 2023

This looks like a PF/React issue where the position is being calculated after the element is created.

I see it on Cockpit itself, when non-form selects are used (that is: PF selects are affected, not HTML selects which manage their own dropdown). This isn't specific to Cockpit-Machines.

Specific places in Cockpit:

  • Reboot/Shutdown modal's delay time selection (most noticeable on first dropdown)
  • Change system time's dropdowns. It's most noticeable with manu time and clicking on the calendar icon (every time).

Here it is in the time modal:

system-time.webm

Aside from "properly" fixing it (making sure the position is done before inserting it into the DOM), one workaround they could do is to set it to visibility: hidden, insert the element into the DOM, place it, then remove visibility: hidden.

@garrett
Copy link
Member

garrett commented Sep 14, 2023

I think this was fixed in patternfly/patternfly-react#9339... but still isn't in any release yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants