deephaven / vscode-deephaven

Deephaven Visual Studio Code Extension
Apache License 2.0
0 stars 0 forks source link

vscode bugs: Custom panel steals focus #1

Open bmingles opened 3 weeks ago

bmingles commented 3 weeks ago

UPDATE: vscode v90 introduced an optional workbench.editor.alwaysShowEditorActions setting. Setting this to true improves the experience here. Namely the run button will not disappear when running commands or selecting its dropdown. There does still seem to be a problem with the last selected command intermittently not persisting.

There appears to be a vscode bug where custom webview panels steal focus when editor title menus are clicked.

A related bug is that once the custom panel is visible, trying to change the active run command will not work. I assume this is a side effect of the first bug.

To reproduce in the dh-vscode extension:

Setup

  1. Open a dh python script
  2. Click the run button (should see it connect and panel open on right)

Button Hiding

  1. Try clicking the dropdown arrow beside the run button or the overflow menu
  2. The panel tab steals the focus which causes the run button to disappear image

Broken Selection Clicking on different run action won't actually change to the new action

image

Workarounds

e.g. The issue will persist as long as static_table is the visible tab. If you change it to vscode-demo.py, things will work as expected in vscode-ext-testing.py.

image

Related Issues (seem to be the root cause)

These 2 vscode issues seem to be related:

We may not have any way to fix this barring submitting a PR to the vscode repo, so we may need to expose our run commands a different way to improve the user experience.