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

Calendar: Inconsistent behaviour on underlying InputText #3728

Closed
Asderel opened this issue Dec 1, 2022 · 0 comments · Fixed by #6478
Closed

Calendar: Inconsistent behaviour on underlying InputText #3728

Asderel opened this issue Dec 1, 2022 · 0 comments · Fixed by #6478
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@Asderel
Copy link

Asderel commented Dec 1, 2022

Describe the bug

Strange behaviour when writing a time on inputText of the Calendar component

The behaviour occur only when the component has a value and the props timeOnly, mask="99:99" and showOnFocus={false}. It does not happen when showOnFocus={true}

After focusing the input and tart typing, the input doesn't show anything until two characters have been typed and then the cursor appears at the beginning of the input therefore, the first character you typed is pushed to the end of whatever your typing

Reproducer

https://codesandbox.io/s/primereact-test-forked-uz7go2

PrimeReact version

8.7.2

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Set a value to the component
  2. Click on inputtext
  3. The contents of the inputtext gets focused
  4. Type just one character
  5. Nothing appears
  6. After typing the second character the first one should appear at the end

Expected behavior

  1. Set a value to the component
  2. Click on inputtext
  3. The contents of the inputtext gets focused
  4. Type anything
  5. It show the value correctly while typing
@Asderel Asderel added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 1, 2022
@Asderel Asderel changed the title Component: Calendar Calendar: Inconsistent behaviour on underlying InputText when applying a mask and not showing overlay Dec 1, 2022
@Asderel Asderel changed the title Calendar: Inconsistent behaviour on underlying InputText when applying a mask and not showing overlay Calendar: Inconsistent behaviour on underlying InputText Dec 1, 2022
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 2, 2022
@melloware melloware assigned melloware and unassigned melloware Nov 26, 2023
@melloware melloware added this to the 10.6.4 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants