Skip to content

Temperature converter - 'change' event causes confusion #2143

Open
@skirtles-code

Description

@skirtles-code

The temperature converter example currently uses a change event on the <input> fields to react to changes. This has led to some confusion, because the change event doesn't fire on every keystroke, giving the impression that the example doesn't work.

One way to fix that is to use the input event instead, but that brings its own problems:

SFC Playground

Specifically, if you try to remove the contents of one of the fields it will suddenly jump to a value of 0. This only happens if the current value is not already 0, so it is possible to clear the field if you try to do it twice.

It is possible to fix that problem too, but I haven't been able to find a way to do it that doesn't make the example appear cluttered.

We've had two PRs that try to switch from change to input, #1600 and #1924, but neither has been merged because of the extra problems that introduces.

I'm unclear how best to resolve the confusion the current example causes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionTopics to discuss that don't have clear action items yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions