For JavaScript related issues we need browser trace for troubleshooting.
Google Chrome and Microsoft Edge (Chromium)
Google Chrome and Microsoft Edge (Chromium) are both based on the Chromium open source project. The following steps show how to use the developer tools, which are very similar in the two browsers.
1- Navigate to the step just prior to where the issue occurs.
2- Press F12 or select > More tools > Developer tools.
3- By default, the browser keeps trace information only for the page that's currently loaded. Set the following options so the browser keeps all trace information, even if your repro requires going to more than one page:
Select the Network tab, then select Preserve log.
Select the Console tab, select Console settings, then select Preserve Log. Select Console settings again to close the settings pane.
4- Select the Network tab, then select Stop recording network log and Clear.
5- Select Record network log, then reproduce the issue in the portal.
You will see session output similar to the following image.
6- After you have reproduced the unexpected portal behavior, select Stop recording network log, then select Export HAR and save the file.
7- Stop Steps Recorder, and save the recording.
8- Back in the browser developer tools pane, select the Console tab. Right-click one of the messages, then select Save as..., and save the console output to a text file.
9- Package the HAR file, console output, and screen recording in a compressed format like .zip, and share that with Microsoft support.
Reference: https://docs.microsoft.com/en-us/azure/azure-portal/capture-browser-trace