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

Dropdown: visual glitch #6783

Closed
potatosalad94 opened this issue Jun 21, 2024 · 4 comments
Closed

Dropdown: visual glitch #6783

potatosalad94 opened this issue Jun 21, 2024 · 4 comments
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted

Comments

@potatosalad94
Copy link

Describe the bug

I'm experiencing a visual glitch when refreshing the page with a dropdown component

I've attached a reproduction link with the same issue

Screen.Recording.2024-06-21.at.16.08.01.mov

Reproducer

https://stackblitz.com/edit/nextjs-btjxrx?file=app%2Fpage.tsx,app%2Flayout.tsx,app%2Fglobals.css

PrimeReact version

10.6.6

React version

18.x

Language

ALL

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@potatosalad94 potatosalad94 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 21, 2024
@melloware melloware added Component: Tailwind Tailwind specific issue and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 21, 2024
@gcko
Copy link
Contributor

gcko commented Sep 11, 2024

@potatosalad94 I forked and updated your Stackblitz to make the issue clear: https://stackblitz.com/~/github.com/gcko/nextjs-knnkfy?file=app/page.tsx

Example of the issue:
Screenshot 2024-09-11 at 14 17 30

@melloware the issue is due to a Flash of Unstyled Content (FoUC). The following styles are not being loaded until after the content is loaded:

<style type="text/css" data-primereact-style-id="base">...</style>
<style type="text/css" data-primereact-style-id="global">...</style>
<style type="text/css" data-primereact-style-id="common">...</style>
<style type="text/css" data-primereact-style-id="dropdown">...</style>

The main issue is that base includes styling to hide input, select, and chackbox fields, however because it does not get loaded right away, they "flash" before they are actually hidden

@melloware
Copy link
Member

Yep we have an FOUC ticket: #5188

@gcko
Copy link
Contributor

gcko commented Sep 25, 2024

@melloware should this one be marked as a duplicate of #5188 since it is an a permutation of the same issue (FoUC)?

Also @potatosalad94 , Melloware provided a temporary solution to this on that ticket via taking the css, creating a file, and importing it in your root react file -> #5188 (comment)

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Component: Tailwind Tailwind specific issue labels Sep 25, 2024
Copy link

This issue is a duplicate and has already been reported and possibly fixed. Please review other issues both open and closed for a similar issue to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

3 participants