kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
83 stars 22 forks source link

[BUG] - Kirby form input with decimal mask danish language #3346

Open bdunkx opened 7 months ago

bdunkx commented 7 months ago

Describe the bug

When using a kirby form field along with an input utilizing decimal mask, the cursor shifts infront of the comma when typing a double comma instead of an singular. So a user could happen to type a different number than expected.

Describe how to reproduce the bug

  1. Go to https://cookbook.kirby.design/#/home/showcase/form-field
  2. Find the 'Decimal mask' input
  3. Type 1000,,

The ',,' is not a typo but the reproduction of the error, as the cursor will then shift infront of the comma.

Which Kirby version was used?

Kirby version 9, of some variant i suppose as it can be reproduced on Kirby's own website.

What was the expected behavior?

The expected behavior, would be such the cursor didn't shift. So decimals would be entered instead of increasing the number vastly.

Add any screenshots

https://github.com/kirbydesign/designsystem/assets/110385301/77124125-f605-49d0-9d07-755bef90d6be

Please complete the following information:

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review: