Skip to content

KeyFilter: Can't edit value at some cursor positions #16084

@BGBRWR

Description

@BGBRWR

Describe the bug

When using strict regex on a keyfilter, editing a value at any cursor position except the end will not test regex correctly. This will prevent changes to the input.

Environment

Windows 11

Reproducer

https://github-1l73hr.stackblitz.io

Angular version

17.3.12

PrimeNG version

17.18.5

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.12.1

Browser(s)

No response

Steps to reproduce the behavior

https://github-1l73hr.stackblitz.io

To Reproduce:

  1. Click into the input on the value anywhere besides the end.
  2. Try to type any number.
  3. Input will be block.

To allow input at any cursor position:

  1. Delete the cents side of the value to be shorter than .00.
  2. Now you can change value anywhere the cursor is.

Expected behavior

I should be able to type 1000.00 and then move my cursor position to one between 1 and the first 0 and type 2 to change the value to 12000.00.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTS-PORTABLEIssue's fix will be ported to supported LTS versionsType: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions