Skip to content

[EuiFieldNumber] Accepts whitespaces as valid in Firefox and Safari #4097

Closed

Description

@dej611

The EuiNumberField accepts whitespaces as valid chars on firefox and Safari.
Chrome behaviour is correct here.

Safari gif:
euinumber-whitespaces

Same string in Chrome gif:
euinumber-whitespaces-chrome

Activity

  1. cchaos commented on Oct 2, 2020

    @cchaos
    Contributor

    EuiFieldNumber is simply a wrapper around <input type="number">. We don't add any extra logic based on certain browsers. I double-checked Firefox's default behavior and it is the same, it allows the user to enter spaces (and letters):

    Screen Shot 2020-10-02 at 10 40 23 AM

    Though it does actually then show the input as invalid once you de-focus the element.

    Screen Shot 2020-10-02 at 10 40 36 AM

    For that reason, I'm going to say that the true fix is on the browser side, and that the fix we can do in EUI is to be better at displaying invalid while focused which is now a duplicate of #2017 (comment).

    I'm going to close this issue and try to make that one a priority.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions