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

stream,win: fix ghost keypress events #5776

Closed
wants to merge 2 commits into from

Commits on Mar 18, 2016

  1. tty: don't read from console stream upon creation

    The tty.ReadStream constructor initializes this as a socket,
    which causes a read to be initiated. Even though during stdin
    initalization we call readStop shortly after, the read operation
    can consume keypress events from the system buffers.
    
    Fixes: nodejs#5384
    orangemocha committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    9485e58 View commit details
    Browse the repository at this point in the history
  2. stream: emit 'pause' on nextTick

    Readable.resume() schedules the resume operation onto the next tick,
    whereas pause() has immediate effect. This means that in a sequence
    
      stream.resume();
      stream.pause();
    
    .. the 'pause' event will be triggered before the resume operation
    is performed.
    
    For process.stdin, we are relying on the 'pause' event to stop reading
    on the underlying handle. This fix ensures that reads are started and
    stopped in the same order as resume() and pause() are called.
    orangemocha committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    f9768a0 View commit details
    Browse the repository at this point in the history