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

p-floatlabel overlaps selected value of p-dropdown #17331

Open
4 tasks
davidda opened this issue Jan 8, 2025 · 6 comments
Open
4 tasks

p-floatlabel overlaps selected value of p-dropdown #17331

davidda opened this issue Jan 8, 2025 · 6 comments
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@davidda
Copy link
Contributor

davidda commented Jan 8, 2025

Describe the bug

image

Occurrs after the focus leaves the dropdown.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-tnilcrnz?file=src%2Fapp%2Fapp.component.html

Environment

Angular version

19

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Select a value in dropdown, click somwher else to move focus => float label overlaps selected value

Expected behavior

float label stays above field

@davidda davidda added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 8, 2025
@davidda
Copy link
Contributor Author

davidda commented Jan 9, 2025

Can be resolved by importing SelectModule instead of DropdownModule and renaming p-dropdown to p-select.

@morsagmon
Copy link

@davidda Even with p-select, the floatlabel with the variant="on" is not showing correctly. The label is half hidden behind the select box, maybe a z-order of the label can fix this...

@davidda
Copy link
Contributor Author

davidda commented Jan 13, 2025

@morsagmon Try updating to 19.0.2. The issue you're describing did occurr in v18, but not the current version: https://stackblitz.com/edit/github-tnilcrnz-zfel3vvv?file=src%2Fapp%2Fapp.component.html

@morsagmon
Copy link

@davidda Thanks. I'm on 19.0.5 now. The only way I could promote the label forward was using z-index (z-2 class).
Also, the label always shows ON (on the top border of the input control), even when empty and untouched.
I noticed that in your stackblitz, the label is shown INSIDE (as expected) until touched, however, when cleared it remains ON instead of returning to be inside the input control.

@davidda
Copy link
Contributor Author

davidda commented Jan 13, 2025

@morsagmon I think this is the expected behaviour, as the label will stay ON as long as the control has focus. If you click/tab away, it returns to the inside.

@morsagmon
Copy link

@davidda Not in my case. Focus or not - always ON...

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 16, 2025
@mertsincan mertsincan added this to the 19.1.1 milestone Jan 16, 2025
@mertsincan mertsincan modified the milestones: 19.1.1, 19.1.0 Jan 16, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

3 participants