Skip to content

Commit 328ed10

Browse files
authored
Git drop stash commands should use modal dialog (microsoft#166573)
Since the warning is initiated through user action, and the user is required to interact with the warning to finish their intended action we should use a modal dialog here.
1 parent 54e3652 commit 328ed10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extensions/git/src/commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,7 @@ export class CommandCenter {
30173017
const yes = l10n.t('Yes');
30183018
const result = await window.showWarningMessage(
30193019
l10n.t('Are you sure you want to drop the stash: {0}?', stash.description),
3020+
{ modal: true },
30203021
yes
30213022
);
30223023
if (result !== yes) {
@@ -3041,7 +3042,7 @@ export class CommandCenter {
30413042
l10n.t('Are you sure you want to drop ALL stashes? There is 1 stash that will be subject to pruning, and MAY BE IMPOSSIBLE TO RECOVER.') :
30423043
l10n.t('Are you sure you want to drop ALL stashes? There are {0} stashes that will be subject to pruning, and MAY BE IMPOSSIBLE TO RECOVER.', stashes.length);
30433044

3044-
const result = await window.showWarningMessage(question, yes);
3045+
const result = await window.showWarningMessage(question, { modal: true }, yes);
30453046
if (result !== yes) {
30463047
return;
30473048
}

0 commit comments

Comments
 (0)