Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreliable <input> value due to requestAnimationFrame #107

Open
evancz opened this issue Jul 7, 2017 · 0 comments
Open

Unreliable <input> value due to requestAnimationFrame #107

evancz opened this issue Jul 7, 2017 · 0 comments
Labels

Comments

@evancz
Copy link
Member

evancz commented Jul 7, 2017

Context

By default we use requestAnimationFrame for all renders. This allows us to sync up with the natural refresh rate of the browser, which is particularly helpful for animations. It also means that DOM updates are made asynchronously.

Problem

If you type really fast, you can actually change the value of an <input> before Elm has a chance to process things. This can lead to dropped keystrokes right now.

Reports

Possible Solution

It may make sense to have a special kind of on primitive that forces a synchronous render. This could also be useful for capabilities that are only available on the event cycle of a user interaction (e.g. https://github.com/elm-lang/html/issues/130)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant