Skip to content

Cursor jumps to end of dcc.Input when pattern is not satisfied #2612

Open
@ktul

Description

@ktul

Describe your context

dash                      2.11.1
dash-ace                  0.2.1
dash-bootstrap-components 1.4.2
dash-core-components      2.0.0
dash-extensions           1.0.3
dash-html-components      2.0.0
dash-table                5.0.0
dash-uploader             0.6.0
- OS: NixOS
- Browser: Firefox
- Version: 95.0.2

Describe the bug

dcc.Input(type="text",
    placeholder="File name",
    className="create_file_input",
    pattern="[a-zA-Z_][a-zA-Z0-9_]*")

Steps to reproduce:

  • Write "abcdef"
  • Insert "$" in the middle -> "abc$def"
  • Pattern is not satisfied -> text cursor jumps to the end behind "f"

Expected behavior

The text cursor should remain at its position after "c".

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions