adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

[Bug]: Inconsistent behavior of sp-number-field in Safari on iOS #4531

Open mihaiudvuleanu opened 3 weeks ago

mihaiudvuleanu commented 3 weeks ago

Code of conduct

Impacted component(s)

sp-number-field

Expected behavior

The number grouping separator , should not be interpreted as a decimal point. For example if i edit a number displayed as "1,000" and I delete the last 0 digit, the result should be "100".

Actual behavior

While editing a number, the grouping separator is interpreted as a decimal point and, in the above scenario, the result is 1.

Screenshots

number-field

What browsers are you seeing the problem in?

Safari / iOS 17.5.1

How can we reproduce this issue?

  1. Navigate to https://opensource.adobe.com/spectrum-web-components/components/number-field/
  2. Edit the first editable box on the page (from Sizes), by deleting the last digit (try to change it from 1024 to 102)
  3. Hit Enter, now I'm expecting to see 102 in the text box
  4. Instead, it displays 1.02 (the grouping separator was interpreted as a decimal point)

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response