Skip to content

Input's onChange Event Handler Misses Key Strokes? #684

Closed

Description

@rmorshea

Discussed in #668

Originally posted by jkrobicki February 14, 2022
Description
When I fill in the input fast it reacts slowly and miss some letters. In the example I try to write "write here the name" .
name iput

Activity

  1. added this to the 1.0 milestone on Feb 22, 2022
  2. rmorshea commented on Feb 28, 2022

    @rmorshea
    CollaboratorAuthor

    #694 does not appear to have fixed this issue.

  3. Archmonger commented on Mar 1, 2022

    @Archmonger
    Contributor

    My opinion is that if this limitation exists within React, there isn't a major reason to resolve this limitation within v1.

  4. rmorshea commented on Mar 1, 2022

    @rmorshea
    CollaboratorAuthor

    That's what I thought, but it turns out this is only problematic for React in the case where the onChange handler responds asynchronously. When the handling is sync, then everything works.

  5. Archmonger commented on Mar 1, 2022

    @Archmonger
    Contributor

    Do we handle this situation correctly if binding a sync IDOM event handler?

    Or is it only React that behaves properly under those circumstances?

  6. added and removed
    priority-3-lowMay be resolved one any timeline.
    on Mar 2, 2022
  7. rmorshea commented on Mar 2, 2022

    @rmorshea
    CollaboratorAuthor

    Only React behaves correctly in that circumstance.

    The issue is unrelated to the server-side event handler. This has to do with the fact that the server's response to an event is async - the fact that, to trigger a re-render, we have to go to a websocket and asynchronously await a response from the server is analogous to the case where React has problems.

  8. Archmonger commented on Mar 2, 2022

    @Archmonger
    Contributor

    Would buffering received events within a queue help mitigate this? But we may already be doing this if I recall correctly.

  9. added 2 commits that reference this issue on Mar 2, 2022
    adcccb9
    72f6081
  10. rmorshea commented on Mar 2, 2022

    @rmorshea
    CollaboratorAuthor

    That wouldn't really solve the problem. We'd have to buffer until the server responded with the next render before sending the next event. That doesn't work though since the server doesn't have to respond to events at all. That is, we don't strictly have to alternate between render, event, render, event, ...

    I think I've found a way to solve this a different way though in #696

  11. added a commit that references this issue on Mar 2, 2022
    0fa8435
  12. added a commit that references this issue on Mar 2, 2022
    a029189
  13. rmorshea commented on Mar 3, 2022

    @rmorshea
    CollaboratorAuthor

    I'm still observing some weird flicker in Brave, but Chrome and Firefox seem to work fine. Not quite sure why.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions