-
Notifications
You must be signed in to change notification settings - Fork 6k
Escape key caused losing focus out of editor on Vivaldi #638
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
Comments
Not really sure what's going on. If anyone figures out, please let us know. |
Hello, |
Same here. For reference, I think code-server should call
I've tried adapting the user-script from the Vivaldi Forums link above, but it didn't work: // ==UserScript==
// @name code-server-handle-esc.user.js
// @version 0.1
// @description Support Esc key in code-server by preventing propagation Vivaldi blur event.
// @match http://*/*
// @match https://*/*
// ==/UserScript==
// https://forum.vivaldi.net/topic/73501/unmapped-esc-key-changes-focus/16
;(function () {
function addEscListener(e) {
window.removeEventListener('load', addEscListener)
const monaco = document.querySelector('#workbench\\.parts\\.editor')
if (monaco) {
const textarea = monaco.querySelector('textarea')
textarea.addEventListener('keydown', e => {
if (e.key === 'Escape') e.stopPropagation()
})
}
}
window.addEventListener('load', addEscListener)
})() |
We just wrap VS Code so it sounds likely it will need to be fixed there: https://github.com/microsoft/vscode |
@code-asher, I disagree. VSCode doesn't run within a browser, but rather it's own native wrapper window. Since this project wraps VSCode to make it accessible within any browser, it's on this project to prevent browser-specific default behaviors when needed. |
VS Code contains both an Electron and web version. We use the web version, as does GitHub Codespaces (and Gitpod). You can run VS Code's web version directly without our wrapper using Edit to add: we do maintain some patches to make the web version work a bit more nicely for self-hosting use cases. However, we try not to patch bugs and prefer they go upstream, where they can benefit everyone using the web version of VS Code (Codespaces, Gitpod, etc). If they refuse to fix/add something, we can talk about patching it here though. |
All right, understood, will open an issue there. Thanks @code-asher ! |
Would you add microsoft/vscode#77363 then ? |
@KaKi87 It looks like they are still open to the change if someone opens a new PR? Bug fixes are one thing, but I would hesitate to maintain features that change this many lines. If we think there are unlikely to be conflicts moving forward though I think we could consider it. |
code-server
1.939-vsc1.33.1Description
I usually hit Escape when editing (e.g: cancel intellisense suggestion). It's working normally on Chrome. However, on Vivaldi (which lets you change browser's color, reduce tab's size and hide address bar for less distraction), Escape key constantly cause losing focus out of the editor. I had to press Ctrl + 1 to refocus every time.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: