Skip to content

Commit 1b8e06a

Browse files
author
Justin Chen
committed
added fix on menu anchor on resize
1 parent b05a122 commit 1b8e06a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/editor/contrib/codeAction/browser/codeActionMenu.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
222222
);
223223

224224
renderDisposables.add(this.codeActionList.value.onDidChangeSelection(e => this._onListSelection(e)));
225+
renderDisposables.add(this._editor.onDidLayoutChange(e => this.hideCodeActionWidget()));
226+
225227

226228
// Populating the list widget and tracking enabled options.
227229
inputArray.forEach((item, index) => {
@@ -256,7 +258,7 @@ export class CodeActionMenu extends Disposable implements IEditorContribution {
256258
// resize observer - can be used in the future since list widget supports dynamic height but not width
257259
const maxWidth = Math.max(...arr);
258260

259-
// 40 is the additional padding for the list widget (26px left, 26px right)
261+
// 40 is the additional padding for the list widget (20 left, 20 right)
260262
renderMenu.style.width = maxWidth + 52 + 'px';
261263
this.codeActionList.value?.layout(height, maxWidth);
262264

0 commit comments

Comments
 (0)