primefaces / primefaces/primereact

Password: The element appears broken when toggleMask is activated and contained inside a "p-inputgroup" div element

Open
#6,802 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I have found a visual bug when using a Password component with toggleMask activated, and this element is contained inside a "p-inputgroup" div. I'm using slightly modified code from these examples: PrimeReact InputGroup. When using PrimeReact version 10.6.3 or newer, the Password component appears broken.
image

With version 10.6.2 or older, everything looks OK.
image

Reproducer

https://stackblitz.com/edit/stackblitz-starters-2j1uag

PrimeReact version

10.6.6

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

Use Primereact 10.6.3+ with this source code:

  <div>
    <div className="p-inputgroup flex-1">
      <span className="p-inputgroup-addon">
        <i className="pi pi-user"></i>
      </span>
      <InputText placeholder="Username" />
    </div>

    <div className="p-inputgroup flex-1">
      <span className="p-inputgroup-addon">$</span>
      <InputNumber placeholder="Price" />
      <span className="p-inputgroup-addon">.00</span>
    </div>

    <div className="p-inputgroup flex-1">
      <span className="p-inputgroup-addon">password</span>
      <Password toggleMask placeholder="password" />
    </div>
  </div>
Expected behavior

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproducer and compare the Password component inside a p-inputgroup between PrimeReact 10.6.2 and 10.6.6. Trace the toggleMask rendering and related input-group styling, then verify that the password field has the expected layout alongside the addon in the provided example.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.