Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing dialog does not cancel (Manjaro Linux) #154719

Closed
NicoWeio opened this issue Jul 10, 2022 · 4 comments · Fixed by #155049
Closed

Closing dialog does not cancel (Manjaro Linux) #154719

NicoWeio opened this issue Jul 10, 2022 · 4 comments · Fixed by #155049
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug dialogs Issues with native and custom dialogs insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@NicoWeio
Copy link

NicoWeio commented Jul 10, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.68.1, 1.69.0
  • OS Version: Manjaro Linux 21.3.1, 21.3.3

Steps to Reproduce:

  1. Create a new text file (Ctrl+N)
  2. Set the language mode to something you don't have a formatter for (e.g. LaTeX)
  3. Invoke Format document (Ctrl+Shift+I)
  4. A dialog opens, which says “There is no formatter for latex files installed.” and allows the user to a) install one or b) cancel.
  5. Close the modal either by pressing Esc, by pressing the X on the window decoration, or by pressing Ctrl+F4
  6. The Extensions pane opens, even though the user wanted to cancel.

I can't reproduce this using Codespaces / VNC on main, but on multiple machines running Manjaro.

Some relevant code snippets:

const res = await dialogService.show(
Severity.Info,
message,
[nls.localize('cancel', "Cancel"), nls.localize('install.formatter', "Install Formatter...")]
);
if (res.choice === 1) {
showExtensionQuery(paneCompositeService, `category:formatters ${langName}`);
}

/**
* Present a modal dialog to the user.
*
* @returns A promise with the selected choice index. If the user refused to choose,
* then a promise with index of `cancelId` option is returned. If there is no such
* option then promise with index `0` is returned.
*/
show(severity: Severity, message: string, buttons?: string[], options?: IDialogOptions): Promise<IShowResult>;

@jrieken
Copy link
Member

jrieken commented Jul 13, 2022

@bpasero I am reading this wrongly or is there a bug with the dialog service? I am not providing cancelId, assuming it defaults to 0 so that my logic only works for the 1 case

@bpasero
Copy link
Member

bpasero commented Jul 13, 2022

See #155049

@bpasero bpasero self-assigned this Jul 13, 2022
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug dialogs Issues with native and custom dialogs labels Jul 13, 2022
@bpasero bpasero added this to the July 2022 milestone Jul 13, 2022
bpasero added a commit that referenced this issue Jul 13, 2022
* Closing dialog does not cancel (Manjaro Linux) (fix #154719)

* set `cancelId`
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Jul 13, 2022
Yoyokrazy pushed a commit to Yoyokrazy/vscode that referenced this issue Jul 13, 2022
…microsoft#155049)

* Closing dialog does not cancel (Manjaro Linux) (fix microsoft#154719)

* set `cancelId`
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jul 14, 2022
andreamah pushed a commit that referenced this issue Jul 14, 2022
* Closing dialog does not cancel (Manjaro Linux) (fix #154719)

* set `cancelId`
@bpasero bpasero added the author-verification-requested Issues potentially verifiable by issue author label Jul 15, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@NicoWeio, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 1cd90cc of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@NicoWeio
Copy link
Author

/verified

@VSCodeTriageBot VSCodeTriageBot added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels Jul 15, 2022
jrieken pushed a commit that referenced this issue Jul 18, 2022
* Closing dialog does not cancel (Manjaro Linux) (fix #154719)

* set `cancelId`
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug dialogs Issues with native and custom dialogs insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants