From ef71b038ad2518e32514b6cc3a4df9f94c096e65 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Wed, 22 Nov 2023 13:59:36 -0800 Subject: [PATCH] fix: prioritize diff revert arrow over breakpoints (#198895) * fix: prioritize diff revert arrow over breakpoints * fix: revert icon shouldn't disable gutter context menu --- .../browser/widget/diffEditor/diffEditorDecorations.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.ts b/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.ts index 6791b2f9df236..baf6d4921a5b5 100644 --- a/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.ts +++ b/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.ts @@ -218,8 +218,11 @@ class RevertButton implements IGlyphMarginWidget { private readonly _selection: boolean, ) { this._domNode.onmousedown = e => { - e.stopPropagation(); - e.preventDefault(); + // don't prevent context menu from showing up + if (e.button !== 2) { + e.stopPropagation(); + e.preventDefault(); + } }; this._domNode.onmouseup = e => { e.stopPropagation(); @@ -251,7 +254,7 @@ class RevertButton implements IGlyphMarginWidget { endColumn: 1, endLineNumber: this._lineNumber, }, - zIndex: 0, + zIndex: 10001, }; } }