taiga-family / taiga-ui

Angular UI Kit and components library for awesome people
https://taiga-ui.dev
Apache License 2.0
3.24k stars 450 forks source link

🐞 - `InputPhone` fails to format paste if value has space after plus sign #9592

Open nsbarsukov opened 5 days ago

nsbarsukov commented 5 days ago

Reproduction url

https://taiga-ui.dev/components/input-phone/API

Description

  1. Open https://taiga-ui.dev/components/input-phone/API
  2. Insert the following value (there is space after + sign)
    + 7 (123) 456-78-90

Expected: +7 (123) 456-78-90 Actual: +7 (712) 345-67-89

Possible solution

Improve this RegExp (add some \s?) https://github.com/taiga-family/taiga-ui/blob/b4f4f32b43e78a47aa66cdaa6ed411c5ccb02f71/projects/legacy/components/input-phone/utils/complete-phone-insertion-preprocessor.ts#L21-L27

Taiga UI version

4.12.0

Browser Used

Chrome

OS Used

macOS

nezar-khamidekh commented 4 days ago

I will take it