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

nodejs: resize doesn't fire on Windows Terminal #3238

Closed
8HoLoN opened this issue Oct 17, 2019 · 5 comments
Closed

nodejs: resize doesn't fire on Windows Terminal #3238

8HoLoN opened this issue Oct 17, 2019 · 5 comments
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@8HoLoN
Copy link

8HoLoN commented Oct 17, 2019

Environment

Windows build number: W10P : Microsoft Windows [version 10.0.18362.418]
Windows Terminal version (if applicable): Windows Terminal (Preview) Version: 0.5.2762.0


nodejs: v12.11.1

cmd-resize-bug.zip

Steps to reproduce

1. Open cmd or powershell on Windows Terminal
2. run node test.js (after npm i)
3. resize Windows Terminal => the number of column or row is not modified, resize event is not fired

Expected behavior

  1. run the same node test.js on native cmd or powershell and resize the window => everything is OK (the number of row and column is updated)

Actual behavior

  1. resize Windows Terminal => the number of column or row is not modified, resize event is not fired
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 17, 2019
@DHowett-MSFT
Copy link
Contributor

So! This is a fun one. Node has decided to ignore the built-in console "resize" events that are automatically generated for anybody who asks, and instead listen to our accessibility subsystem to figure out when the console window has changed size. Since they took a hard dependency on a system that we never offered with an application compatibility guarantee, their resize detector doesn't work in WT.

This is related to #281.

I'm digging up our PM contact with nodejs to make sure we drive this somewhere.

@DHowett-MSFT DHowett-MSFT added the Product-Terminal The new Windows Terminal. label Oct 17, 2019
@DHowett-MSFT DHowett-MSFT changed the title Resize doesn't fire on Windows Terminal nodejs: resize doesn't fire on Windows Terminal Oct 17, 2019
@DHowett-MSFT
Copy link
Contributor

/cc @yodurr

@8HoLoN
Copy link
Author

8HoLoN commented Oct 17, 2019

For the reference : https://nodejs.org/api/tty.html#tty_event_resize

@oising
Copy link
Collaborator

oising commented Oct 18, 2019

Even more pertinent information on #410

@DHowett-MSFT
Copy link
Contributor

It looks like the documentation was updated at some point, but there's a note in this version that explains what's going wrong.

If you switch your tty into raw mode and resume it, you'll get resize events.

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants