The caret is moved when editing inside a RadzenMask, leading to errors in data #1246

Open
opened 2026-01-29 17:51:01 +00:00 by claunia · 0 comments
Owner

Originally created by @bergy6808 on GitHub (May 24, 2024).

Describe the bug
We use RadzenMask at several places for phones, government ids, etc.. The issue is when an employee wants to edit it somewhere in the middle. As soon as the employee hits backspace when the caret is not at the end, the caret is moved to the end, causing a high probability of mistakes. The leads to possible loss of data or entering bad data.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://blazor.radzen.com/mask
  2. Click on the first Telephone field you see
  3. Enter a phone number
  4. Try editing only the regional number

Expected behavior
The caret stays where it's supposed to be (not at the end) and we can smoothly edit the beginning of the text in a RadzenMask.

Additional context
We use Blazor Server, .Net 8

Originally created by @bergy6808 on GitHub (May 24, 2024). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** We use RadzenMask at several places for phones, government ids, etc.. The issue is when an employee wants to edit it somewhere in the middle. As soon as the employee hits backspace when the caret is not at the end, the caret is moved to the end, causing a high probability of mistakes. The leads to possible loss of data or entering bad data. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://blazor.radzen.com/mask 2. Click on the first Telephone field you see 3. Enter a phone number 4. Try editing only the regional number **Expected behavior** The caret stays where it's supposed to be (not at the end) and we can smoothly edit the beginning of the text in a RadzenMask. **Additional context** We use Blazor Server, .Net 8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1246