You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting a value programmatically in an input field with an applied Inputmask, an issue occurs: if the cursor is placed before a "." or "-", the mask stops functioning correctly, and further input becomes impossible.
Steps to reproduce
Include jQuery and the Inputmask library (version 5.0.2 or later).
Add an input field to the page and apply the following mask: 99.99.99 - 99.99.99.
Programmatically set the value to 16.03.25 - 17.03.25 (random).
Try placing the cursor before a "." or "-".
Expected Behavior
The cursor should be able to move freely within the input field without blocking data entry.
Actual behavior
When the cursor is placed before "." or "-", the mask freezes, and input becomes impossible.
Tested versions
Version 4.0.9: Works correctly.
Versions 5.0.0 - 5.0.1: The issue occurs only for "-".
Version 5.0.2 and later: The issue occurs for both "." and "-".
This fiddle contains all tested versions from 4.0.9 to 5.0.10-beta.14 (just uncomment the desired version).
I suspect the issue might be related to the seekNext method used in keypressEvent, but understanding and fixing it is too complex for me.
Affected browsers
The issue occurs in all modern browsers, including Chrome and Firefox.
The text was updated successfully, but these errors were encountered:
Issue description
When setting a value programmatically in an input field with an applied Inputmask, an issue occurs: if the cursor is placed before a "." or "-", the mask stops functioning correctly, and further input becomes impossible.
Steps to reproduce
99.99.99 - 99.99.99
.16.03.25 - 17.03.25
(random).Expected Behavior
The cursor should be able to move freely within the input field without blocking data entry.
Actual behavior
When the cursor is placed before "." or "-", the mask freezes, and input becomes impossible.
Tested versions
Example code
Live example
JSFiddle
This fiddle contains all tested versions from 4.0.9 to 5.0.10-beta.14 (just uncomment the desired version).
I suspect the issue might be related to the seekNext method used in keypressEvent, but understanding and fixing it is too complex for me.
Affected browsers
The issue occurs in all modern browsers, including Chrome and Firefox.
The text was updated successfully, but these errors were encountered: