Skip to content

Commit

Permalink
Merge pull request #10 from FlexConfirmMail/prompt-only-outlook-web
Browse files Browse the repository at this point in the history
Prompt only when outlook web
  • Loading branch information
piroor authored Oct 2, 2024
2 parents 2ba76d9 + 03bb3e7 commit 0293ad4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ function getAllData(callback) {
function onMessageSend(event) {
console.debug("onMessageSend ", event);
getAllData(function () {
// If the platform is web, to bypass pop-up blockers, we need to ask the users if they want to open a dialog.
const needToPromptBeforeOpen = Office.context.mailbox.diagnostics.hostName === "OutlookWebApp";
Office.context.ui.displayDialogAsync(
window.location.origin + "/dialog.html",
{
asyncContext: event,
height: 60,
width: 60,
promptBeforeOpen: needToPromptBeforeOpen,
},
function (asyncResult) {
const dialog = asyncResult.value;
Expand Down

0 comments on commit 0293ad4

Please sign in to comment.