primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.36k stars 4.58k forks source link

PrimeNG v18.0.0-beta.3 : Float Labels are broken #16566

Open mplgn opened 4 days ago

mplgn commented 4 days ago

Describe the bug

When using float labels with a component, upon focus, the label is rendered inside of the field instead above the field. This was working in beta.2.

beta 3 (broken):

https://github.com/user-attachments/assets/71e2191b-c470-4137-8705-a8a4b5d3a213

https://stackblitz.com/edit/stackblitz-starters-yughkb?file=src%2Fapp%2Fapp.component.ts

beta 2 (working):

https://github.com/user-attachments/assets/454864b5-371f-44a0-9ae6-af52ccfb24fa

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

Environment

macOS Sonoma 14.6.1 Angular 18.0.0

NOTE: details below refer to my reproduction of the issue in Stackblitz. However, I've also been able to reproduce this with Angular 18.2.0 and Node 20.17.0.

Reproducer

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

Angular version

18.0.0

PrimeNG version

18.0.0-beta.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.3

Browser(s)

No response

Steps to reproduce the behavior

  1. Start a new Angular v18 project;
  2. Install PrimeNG 18.0.0-beta.3 (npm install primeng@18.0.0-beta.3)
  3. In app.component.html, place an InputText component that is configured with a FloatLabel
      <p-floatlabel>
        <input pInputText id="username" />
        <label for="username">Text</label>
      </p-floatlabel>
  1. Run the app
  2. Click on InputText field
  3. Observe float label is rendered inside of the field instead of above it

Expected behavior

I expected the float label to be rendered above the input field, as it has been in prior versions of PrimeNG (including 18.0.0-beta.2).

jicedtea commented 3 days ago

FloatLabel work with Aura theme, completely broken with Lara and Nora theme. Even the example on their home page is broken. https://v18.primeng.org/floatlabel It seems that with primeng there is no such thing as stability. Everything can break with each new release.