code-server icon indicating copy to clipboard operation
code-server copied to clipboard

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

Open SkyfallWasTaken opened this issue 1 year ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome on iPadOS (so safari basically)
  • Local OS: iPadOS
  • Remote OS: Ubuntu 23.04
  • Remote Architecture: amd64
  • code-server --version: 4.17.1

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?

  • [X] I cannot reproduce this in VS Code.
  • [X] I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • [X] I am using HTTPS.

Notes

  • Duplicate of https://github.com/coder/code-server/issues/4182 - that said, the issue is marked as stale, plus it's from 2022
  • Due to an issue with GitHub Codespaces not working on iPadOS 16.2 (see https://github.com/microsoft/vscode/issues/190930) I'm not sure if this issue is on GH codespaces. That said, VSCode does not have this problem
  • I can confirm that the keyboard itself is working outside of code-server (e.g. Chrome address bar will correctly process the input)

SkyfallWasTaken avatar Oct 01 '23 16:10 SkyfallWasTaken

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.

mreppen avatar Oct 30 '23 17:10 mreppen

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

seulgiism avatar Mar 07 '24 13:03 seulgiism

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.

code-asher avatar Mar 07 '24 22:03 code-asher

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

seulgiism avatar May 08 '24 14:05 seulgiism

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.

messycode0 avatar Jun 07 '24 10:06 messycode0

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.

4i60r avatar Jun 08 '24 09:06 4i60r

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.

seulgiism avatar Jun 08 '24 11:06 seulgiism

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

code-asher avatar Jul 12 '24 00:07 code-asher