Skip to content

Bug - [Slider with Input] - [should accept , as comma for non en US locales] #12052

Closed

Description

@KKoukiou

Describe the problem
This is an issue with

  • Patternfly 6

When using , if the adjacent input is initialized with a non-English decimal separator (comma, e.g. "50,2"), the component breaks: the slider/input get out of sync and/or parsing fails. This happens even when the page/parent container has a non-EN lang (e.g. lang="el").

Affected components: Slider (with isInputVisible, value, inputValue)

How do you reproduce the problem?
https://codesandbox.io/p/sandbox/3kn8jh?file=%2Findex.tsx

Expected behavior
The input next to the slider should accept and display localized decimal separators in line with the container/page lang.

The slider should internally normalize user input (comma or dot) and maintain a numeric state.

Is this issue blocking you?
No, I am now normalizing the input myself.

What is your product and what release date are you targeting?
anaconda installer, no specific target


Jira Issue: PF-2789

Activity

  1. added theissue type on Oct 13, 2025
  2. changed the title [-]Bug - [Component] - [short description][/-] [+]Bug - [Slider with Input] - [should accept , as comma for non en US locales][/+] on Oct 13, 2025
  3. added theissue type on Oct 13, 2025
  4. moved this from Needs triage to Ready to assign in PatternFly Issueson Oct 14, 2025
  5. thatblindgeye commented on Oct 17, 2025

    @thatblindgeye
    Contributor

    @KKoukiou Just to confirm some things:

    • Is it expected that you would pass in a string like "50,2" to the inputValue prop
    • from there, PF would transform that string to a decimal number internal to the component
    • that transformed number would be what's displayed in the input as well as what's stored internally
      • Or rather, is the expectation that the input would still display the commas 50,2, and just internally the component would transform to a decimal to do any calculations, then render it back in the input with the comma again

    The same confirmations above would likely apply to the slider steps as well, in terms of their value and displayed label.

    Would you also be able to confirm whether this is something specific to Slider, or if there are other instances of numbers needed for input where this is a problem? Thinking namely of the NumberInput component

  6. github-actions commented on Dec 18, 2025

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

  7. 4 remaining items

  8. github-actions commented on Jun 24, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

  9. rebeccaalpert commented on Jul 27, 2026

    @rebeccaalpert
    Member

    Looking at language detection, we could use the inherited lang attribute, but OpenShift doesn't change this when language changes.

    OpenShift uses https://github.com/i18next/i18next-browser-languageDetector (this is just the translated codebase I'm most familiar with) and then stores language changes via a dropdown in local storage.

  10. rebeccaalpert commented on Aug 3, 2026

    @rebeccaalpert
    Member

    We had a go at this in #12599. As of right now, it adds a lot of complexity. It sounds like you are already normalizing the input yourself. We'd like to skip adding this for now, but we'd be happy to revisit this if it comes up for more teams again in the future (or if our JavaScript overlords come up with a built-in parser).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions