Skip to content

Conversation

@rkaraivanov
Copy link
Member

When the browser auto-fills a masked input field, it may include literal characters as part of the filled value. The previous implementation did not correctly handle such cases, leading to incorrect parsing and display of the input value.

When the browser auto-fills a masked input field, it may include literal characters
as part of the filled value. The previous implementation did not correctly handle
such cases, leading to incorrect parsing and display of the input value.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes incorrect handling of browser auto-filled values in masked input fields when the mask contains literal characters. The fix ensures that auto-filled values are properly parsed to extract only the input characters, excluding mask literals.

  • Added parsing of auto-filled values to strip literal characters before updating the input
  • Extended auto-fill case handling to include empty string input types
  • Added test coverage for auto-fill behavior with literal-containing masks

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/mask-input/mask-input-base.ts Added parser.parse() call to strip literals from auto-filled values and included empty string in auto-fill case
src/components/mask-input/mask-input.spec.ts Added test case verifying correct handling of auto-filled values containing mask literals

@rkaraivanov rkaraivanov merged commit 2f670dd into master Nov 27, 2025
7 checks passed
@rkaraivanov rkaraivanov deleted the rkaraivanov/mask-auto-fill-literals branch November 27, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants