Modal dialog Azure Devops flickering

312 Views Asked by At

I have developed a modal pop up window by using the link https://learn.microsoft.com/en-us/azure/devops/extend/develop/using-host-dialog?view=azure-devops and provided option to open the pop up under Actions option. When pop opens it keeps on opening multiple pages continuously. Is there any solution to stop it and open only one instance of the window?

dialogService.openDialog(contributionId, dialogOptions).then(function(dialog){}

The above is the code to call the pop window. enter image description here

contribution:

 "contributions": [
        {
            "id": "registration-form",
            "type": "ms.vss-web.action",
            "description": "The content to be displayed in the dialog",
            "targets": ["ms.vss-work-web.work-item-context-menu"],
            "properties": {
                "text": "ValidateDialog",
                "title": "ValidateDialog",
                "toolbarText": "ValidateDialog",
                "uri": "registration-form.html"           
            }
        }
    ],
    "scopes": [
        "vso.work"
    ],
    "files": [       
        {
            "path": "register_main.js",
            "addressable": true
        },
        {
            "path": "register-form.html",
            "addressable": true
        },
        {
            "path": "node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js",
            "addressable": true            
        }
    ]

I have use following option to call the dialog: https://learn.microsoft.com/en-us/azure/devops/extend/develop/using-host-dialog?view=azure-devops#showing-the-dialog-advanced

created html file with registration-form.html : https://learn.microsoft.com/en-us/azure/devops/extend/develop/using-host-dialog?view=azure-devops#dialog-contents

0

There are 0 best solutions below