zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
159 stars 89 forks source link

Copy/paste keybinds in editor throws error while Data Sets tree is focused in Side Bar #2923

Open traeok opened 1 month ago

traeok commented 1 month ago

Describe the bug

If a user tries to use the copy/paste key binds in an editor while the Side Bar is open and the data sets tree is focused, Zowe Explorer will catch the key binds instead and will break copy/pasting in editors as a result.

There are a couple workarounds:

To Reproduce

  1. Click on Zowe Explorer to show tree views in Activity Bar
  2. Set a filter search on a data set profile
  3. Expand the profile and open one of its Data Sets
  4. Click on the Data Set node to focus back to the tree view
  5. Hide the Side Bar and then open it again with the shortcut (Ctrl/Command+B)
  6. Attempt to copy and paste in the editor while the side bar is open

Expected behavior

The copy/paste key binds should not interfere with editor actions. They should only work while the sidebar is focused.

Screenshots

image

Desktop (please complete the following information):

Additional context

In theory, this can be fixed by adding && sidebarFocus to the when clause for both the zowe.ds.copyDataSets and zowe.ds.pasteDataSets commands in package.json.

github-actions[bot] commented 1 month ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

t1m0thyj commented 1 month ago

I've tried to add && sidebarFocus to the "when" clause and it seems to break the Ctrl+C and Ctrl+V shortcuts so that they don't work even when one of the tree views is focused.

This seems like it may be a VS Code bug, where focusedView should be reset after the side bar is toggled but isn't:

Edit: Thanks @traeok for confirming that sidebarFocus doesn't work, which confirms this is a VS Code bug.