Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(input,input-number): allow typing decimal separator in firefox for arabic locale #7173

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/calcite-components/src/utils/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ export class NumberStringFormat {
].reverse();

const index = new Map(this._digits.map((d, i) => [d, i]));
const parts = new Intl.NumberFormat(this._numberFormatOptions.locale).formatToParts(-12345678.9);

// numberingSystem is parsed to return consistent decimal separator across browsers.
const parts = new Intl.NumberFormat(this._numberFormatOptions.locale, {
numberingSystem: this._numberFormatOptions.numberingSystem
} as Intl.NumberFormatOptions).formatToParts(-12345678.9);

this._actualGroup = parts.find((d) => d.type === "group").value;
// change whitespace group characters that don't render correctly
Expand Down