Bellino
November 7, 2019, 8:46am
#1
From time to time I cannot type anything into the library browser. When I click into the search box, no blinking cursor appears. If I then start typing, nothing happens.
The only workaround I could find so far is to close and re-open Platformio IDE. This usually fixes the issue (but it comes back after a couple of minutes).
This happens to me all the time on Windows and Mac, on at least three different machines.
This is a known VSCode bug. Just do double click on PIO Home tab.
Bellino
November 8, 2019, 7:42am
#3
Is this bug being adressed by the VS Code Team? It seems to have been there for quite some time…
Yup, it’s been around since around July… and is being tracked here:
opened 10:20AM - 08 Jul 19 UTC
closed 07:33PM - 21 Nov 19 UTC
bug
help wanted
verified
candidate
webview
electron
upstream-issue-fixed
- VSCode Version: Version: 1.37.0-insider
Commit: d50852db1af10ec100a71ad57cc3a… 04c8aead117
Date: 2019-07-08T05:33:31.335Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 17.7.0
- OS Version: macOS High Sierra 10.13.6 (17G7024)
Steps to Reproduce:
1. Execute the following sample code of extension.
2. Execute the `Hello World` command.
2. Click the tab of WebView and press the `f` key of the keyboard.
3. In the conlose, only the `window focused!` message shown.
4. Click the tab of WebView, again. Then, press `f`.
5. The message `keyboard F typed!` shown.

```typescript
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
const rootUrl = vscode.Uri.file(context.extensionPath)
const disposable = vscode.commands.registerCommand('extension.helloWorld', async (args, brgs, crgs) => {
if (!vscode.window.activeTextEditor) {
return;
}
const panel = vscode.window.createWebviewPanel(
'catCoding',
'Cat Coding',
{ preserveFocus: true, viewColumn: vscode.ViewColumn.Beside },
{ enableScripts: true }
);
panel.webview.html = getHtml();
});
context.subscriptions.push(disposable);
}
function getHtml() {
return `
<!DOCTYPE html><html><head></head>
<body>
<script>
window.onfocus = function() {
console.log('window focused!');
}
window.addEventListener('keydown', function(evt) {
if(evt.keyCode == 70 && evt.target.nodeName != 'INPUT') {
console.log('keyboard F typed!')
}
})
</script>
`
}
// this method is called when your extension is deactivated
export function deactivate() {}
```
Does this issue occur when all extensions are disabled?: Yes
1 Like