microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modal Dialog in Azure DevOps Extension

shajusukumaran opened this issue · comments

I am trying to create a confirmation window and for that i am using this:

const dialogService = await SDK.getService<IHostPageLayoutService>(CommonServiceIds.HostPageLayoutService);
dialogService.openCustomDialog

Everything works fine, but the problem is that when user clicks anywhere outside the dialog the dialog is closed, but i want the dialog to close only when user clicks on the buttons provided in the custom dialog. How to achieve that?

Thanks,
Shaju

@nkirchem any inputs from you on this would be helpful :)

@shajusukumaran We added support for a lightDismiss property (defaults to true) in dialogOptions that you will be able to set to false in your scenario in order to prevent the dialog from closing when the user clicks outside the dialog area. This will take a week or two to finish rolling out and we'll update the extension API once it does.