When using displayDialogAsync
to open a dialog in an Office Web Add-In, the dialog by default includes the browser’s title bar, which often displays the URL. This can be confusing or undesirable for users since the URL is typically not relevant in the context of the task pane.
Currently, there isn't a direct option to remove the title bar when opening the dialog box via displayDialogAsync
. This is due to the way web browsers handle dialogs and how Office Add-ins interact with the browser interface. The title bar often includes the URL, which is a standard browser feature.
Possible Workarounds:
Control URL via the Dialog: You can manage the content within the dialog box to display relevant information instead of the URL. For instance, you can design the content inside the dialog to look like a modal without showing the URL.
Full-screen Dialog: Another potential workaround is to use a full-screen dialog where you can control the content more freely, though you’ll still encounter the browser’s title bar. For certain scenarios, this may help reduce the visual disruption.
Feedback to Microsoft:
If this is a critical issue for your user experience, the best option is to submit feedback to Microsoft. You can do this via the Microsoft 365 Developer Platform feedback channel or through the UserVoice platform, requesting that they provide more customizable dialog options or allow the hiding of the title bar in dialogs launched by displayDialogAsync
.
Current Limitation:
At this point, Microsoft hasn't provided a built-in option to hide the title bar of a dialog opened via displayDialogAsync
. Therefore, the title bar with the URL is part of the dialog’s appearance in browsers, and customizability around that element is limited.