Skip to content

Commit

Permalink
context menu - address part of #188903 (#188923)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jul 26, 2023
1 parent 96ebd36 commit 4b947b8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/vs/workbench/contrib/files/browser/views/explorerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,17 @@ export class ExplorerView extends ViewPane implements IExplorerView {
const stat = e.element;
let anchor = e.anchor;

// Compressed folders
if (stat) {
const controller = this.renderer.getCompressedNavigationController(stat);

if (controller) {
if (e.browserEvent instanceof KeyboardEvent || isCompressedFolderName(e.browserEvent.target)) {
anchor = controller.labels[controller.index];
} else {
controller.last();
// Adjust for compressed folders (except when mouse is used)
if (DOM.isHTMLElement(anchor)) {
if (stat) {
const controller = this.renderer.getCompressedNavigationController(stat);

if (controller) {
if (e.browserEvent instanceof KeyboardEvent || isCompressedFolderName(e.browserEvent.target)) {
anchor = controller.labels[controller.index];
} else {
controller.last();
}
}
}
}
Expand Down

0 comments on commit 4b947b8

Please sign in to comment.