-
Notifications
You must be signed in to change notification settings - Fork 1k
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
FloatLabel: Incorrect position when using browser autofill #2921
Comments
andreiGadjylaJS
added
the
Type: Bug
Issue contains a defect related to a specific component.
label
May 24, 2022
melloware
changed the title
Component: InputText
FloatLabel: Incorrect position when using browser autofill
May 24, 2022
The problem is this: .p-float-label input:-webkit-autofill ~ label {
top: -20px;
font-size: 12px;
} For some reason when using webkit-autofill its adding -20px to top instead of the normal -0.75rem when NOT using autofill? |
As a workaronud just add this CSS to your custom CSS of your project: .p-float-label input:-webkit-autofill ~ label {
top: -0.75rem;
font-size: 12px;
} |
melloware
added
the
Resolution: Workaround
Issue or pull request contains a workaround. It needs to be reviewed further by Core Team
label
May 24, 2022
Thanks. |
mertsincan
removed
👍 confirmed
Resolution: Workaround
Issue or pull request contains a workaround. It needs to be reviewed further by Core Team
labels
Jul 1, 2022
mertsincan
pushed a commit
that referenced
this issue
Jul 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Good afternoon. When you click on the label field, it works correctly. But when choosing a value from the drop-down list provided by the browser (previously entered value in the field), the label moves to the top, when choosing a value from previously entered values, the label remains in the wrong place, but when changes are made to the field, the label returns to its place.
Reproducer
https://codesandbox.io/s/naughty-poincare-5sxfrq?file=/src/demo/InputTextDemo.tsx
PrimeReact version
8.1.0
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 101.0.4951.67
Steps to reproduce the behavior
Expected behavior
When working with the InputText field, its label was placed at the place specified for it, and did not change position when entering data into this field
The text was updated successfully, but these errors were encountered: