Skip to content

Commit bc7496e

Browse files
authored
editors - do not check confirm again right after for custom confirm handlers (microsoft#155024)
1 parent 3ec5a08 commit bc7496e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/browser/parts/editor/editorGroupView.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,9 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
15761576
// again to see if anything needs to happen before closing for good.
15771577
// This can happen for example if `autoSave: onFocusChange` is configured
15781578
// so that the save happens when the dialog opens.
1579-
if (!this.shouldConfirmClose(editor)) {
1579+
// However, we only do this unless a custom confirm handler is installed
1580+
// that may not be fit to be asked a second time right after.
1581+
if (!editor.closeHandler && !this.shouldConfirmClose(editor)) {
15801582
return confirmation === ConfirmResult.CANCEL ? true : false;
15811583
}
15821584

0 commit comments

Comments
 (0)