coder / code-server

VS Code in the browser
https://coder.com
MIT License
68.54k stars 5.62k forks source link

[Bug]: Keyboard loses focus after going on another page #6469

Closed SkyfallWasTaken closed 4 months ago

SkyfallWasTaken commented 1 year ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Open code-server
  2. Use Split View, or go on another page
  3. Come back to code-server
  4. You can't type in a file

Expected

You can type in the file

Actual

Typing just... doesn't work?

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

Are you accessing code-server over HTTPS?

Notes

mreppen commented 1 year ago

For me, sometimes it is not only typing that stops working, but all keyboard input. FWIW no https.

Changing editor tabs (inside code-server, not browser tabs) seems to reset it for me.

seulgiism commented 8 months ago

i know this issue is from 2023, but my keyboard input suddenly stops working... after waiting a few seconds? deleting works and immediately typing afterwards fixes the problem temporary. but if the file is blank i can't type at all. I think it has to do something with suggestions in the editor since the editor stops receiving keyboard input the moment in highlights some text in grey.

how do i fix this? I have the problem on windows, mac and ipad

code-asher commented 8 months ago

Keyboard issues seem likely to be an upstream issue with https://github.com/microsoft/vscode and not something we can fix here, I think the best path forward is to try reproducing on Codespaces or vscode.dev and then use that to submit a bug report upstream.

If it does only happen with code-server and not Codespaces nor vscode.dev though...that would be very confusing.

seulgiism commented 6 months ago

i figured it out... it was an extension causing problems with the keyboard; since i use google sync the extensions are also on all my other devices.

one solution is to turn off all third party extensions to see if that fixes it for people reading this in the future

messycode0 commented 5 months ago

i figured it out... it was an extension causing problems with the keyboard; since i use google sync the extensions are also on all my other devices.

one solution is to turn off all third party extensions to see if that fixes it for people reading this in the future

Do you know what extension is it? Because I don’t think it’s any of mine but I may be wrong.

4i60r commented 5 months ago

Hello. I have recently started using code-server and I am also experiencing this problem. I am using code-server as PWA. I tested VSCode the same way (PWA) and it also happens. When going back to the PWA VSCode/code-server, the focus is lost and typing (even when re-clicking the text) does not work. The only solution is to e.g. click the command center bar at the top and click back into the editor to start typing. In Safari, alt+tabbing into code-server works perfectly. I am on iPadOS 17.4.1, code-server is 4.89.1, typing via external Smart Connector keyboard.

Sometimes, (in PWA, after alt+tabbing in) the iPadOS blue cursor is blinking but typing just does not work. The shortcut for opening keyboard options is also gone (which is weird, because the cursor indicates that I can type, so "keyboard context" should be active?). Looks like it's not a code-server issue.

seulgiism commented 5 months ago

i figured it out... it was an extension causing problems with the keyboard; since i use google sync the extensions are also on all my other devices.

one solution is to turn off all third party extensions to see if that fixes it for people reading this in the future

Do you know what extension is it? Because I don’t think it’s any of mine but I may be wrong.

For me it was the Migaku Browser Extension. But, I had to turn off everything one by one to figure that out. It can also be a script intervening, but you have to test that out for yourself.

code-asher commented 4 months ago

Closing since for now it seems there is nothing to change in code-server. Let me know if I got it wrong.