Billy H
Billy H

Reputation: 3

Opening same origin page in default browser from outlook add-in

I have an outlook add-in using office.js. The add-in uses requirement set 1.5. If the addin is opened in the browser, it behaves as expected. (links with target set to "_blank" open in new tab, regardless of origin) When clicking a link that has the same origin as the apps SourceLocation, and the target is set to "_blank", the page is opened in a small browser within outlook, rather than opening in the users default browser.

I have tested on the following versions:

Same domain links open in the popup window:

Windows 10 Enterprise
    Version 1903
    Build 18362.418
Outlook
    Version 1908 
    Build 11929.20388 Click-to-Run

Windows 10 Enterprise
    Version 1903
    Build 18362.418
Outlook
    Version 1908 
    Build 11929.20300 Click-to-Run

Works as intended (opens in default browser) :

macOS 
    Mojave 
    version 10.14.6 
Outlook:
    Version 16.29 (19090802)

Windows 10 Enterprise
    Version 1803
    Build 17134.766
Outlook
    Version 1908 
    Build 11929.20300 Click-to-Run

Windows 10 Enterprise
    Version 1809
    Build 17763.557
Outlook
    Version 1803 
    Build 9126.2275 Click-to-Run

I believe this issue started with a recent update to either windows or outlook : around the same time the add-in started to use Edge rather than IE. Note that when tested on mac, a page opened using window.open(URL, '_blank'); opens in a popup browser rather than the users default browser if the url being opened has the same origin as the apps SourceLocation.

Upvotes: 0

Views: 363

Answers (3)

markdon
markdon

Reputation: 871

There is a new Officejs API available to handle this. See Open Browser Window API requirement sets for the supported clients. See Office.UI interface for usage.

If you're supporting Outlook web or non-365 clients, use Office.context.requirements.isSetSupported('OpenBrowserWindowApi','1.1') to check whether you can use openBrowserWindow, otherwise use window.open.

Upvotes: 1

hoz
hoz

Reputation: 571

How would you expect users to have a seamless experience when any links open in a pop-up window which cannot be maximised or minimised. Users usually expect to use their default browser rather than the default browser. We use URL parameters to pass data across due to this.

I guess you have made it user friendly for developers, but not the actual user. I suggest that you review this latest update. The ideal solution would be to allow the developers to choose how the links should open rather than Microsoft deciding what is best for each and every add-in developed out there.

I guess we'll need to host the add-in in a separate domain to accommodate this and let the users have a seamless experience. Such an inconvenience.

Upvotes: 0

user7823505
user7823505

Reputation:

The behavior that you're seeing is by design. New windows are opened with Edge if it is the same domain in order to support using cookies to pass data to the window.

Upvotes: 0

Related Questions