title: Office.js | Desktop excel | restrict user to interact with excel or add-ins pane if dialog is open
body: <p>I am using office.js to create excel add-ins. I do have requirement to open dialog box from task pane and show task pane content in to the dialog box. To show task pane content on dialog box using client side routing.
  Using below code we are able to open dialog in online as well as in desktop excel.</p>
  <pre><code>const urlDialogBox = `${window.location.origin}/#/output-form/`;
  Office.context.ui.displayDialogAsync(
              urlDialogBox,
              {
                  height: 80,
                  width: 80,
                  displayInIframe: true,
              },
              asyncResult =&gt; {
                  dialog = asyncResult.value;
                  dialog.addEventHandler(
                      Office.EventType.DialogEventReceived,
                      processDialogEvent,
                  );
                  dialog.addEventHandler(
                      Office.EventType.DialogMessageReceived,
                      processMessage,
                  );
              },
          );
  </code></pre>
  <p><strong>Now the requirement is once user opens the dialog box from task pane, restrict user to interact with task pane as well as excel area. In Online excel (Office 365) its working as expected, dialog box is working like popup and do not allow user to click on task pane as well as in excel area.</strong></p>
  <p>How can we use dialog box to work like popup in case of desktop excel? Is there any way or it is the limitation in case of desktop excel.</p>