-
Notifications
You must be signed in to change notification settings - Fork 829
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
mouse stops working after vscode ide reload #5380
Comments
I don't think this is something we can fix. I think you should raise it on the VSCode repository. |
Thank you for the response! You definitely know more about this than I do, but one important thing to note is that if I put the Textual app in a tmux session (still within VS Code) then the mouse works fine after a reload. So there may be something peculiar to the handshaking between textual and xterm.js. I'm afraid that if I simply post a bug on the VS Code repo that says "textual apps don't respond to the mouse after a reload" it will basically just die on the vine there (as many bugs with merit tend to do there). I'm thinking that given the ubiquity of VS Code terminal usage that as mysterious as this interaction may be you will have both more incentive and more technical basis to assess than they do. I guess I'm saying that even if the fix is on their end, I see the chances of them prioritising the research required to sort this out as vanishingly small. Maybe we can give them an assist of some kind that will make it more of a no brainer for them to fix. |
Discovered what might be a good clue here: if you suspend and restore the app (e.g. using |
A further update, simply calling So if there is some way for textual to detect that mouse support has been disabled then this might be a path to making it work. |
Here is a workaround that I came up with (re-enable mouse support whenever the app gains focus): UKGovernmentBEIS/inspect_ai@8ce3409 Perhaps tmux is doing something like this? Not sure if you want to do this in textual, but I will say that the user failure mode is pretty unpleasant for any app where the user has "work in progress" that is apparently lost to the frozen app. It might be consider gross to re-send these ANSI codes, but then again it might just be a necessary concession to the vagaries of xterm.js. |
If you are running a textual application within VS Code and the IDE is reloaded (e.g. after an extension installation for via the Developer: Reload Window command) the mouse stops working in the textual application. Note that the application is still running/working and keyboard gestures all work as expected.
You can repo by running the stopwatch app from the textual repo:
Then, execute Developer: Reload Window. Mouse gestures will no longer work.
Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: