Skip to content

unwanted cursor jump with onInput #105

@wintvelt

Description

@wintvelt

When the value of an input field is managed in the model, like so:

input [ onInput HandleInput, value model.value ] []

Then fast typing will cause the cursor to jump from the current position to the end of the input field.
SSCE here https://runelm.io/c/wdr.

This "bug" has led to various patterns, such as using defaultValue instead of value. But that particular solution is "leaky". If the input field is reused by VDOM, its internal value will also be reused. In a specific scenario (example here) this causes contents of a password field to show.

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