Skip to content

Commit

Permalink
[FIX] outlook: show a warning message for Internet Explorer users
Browse files Browse the repository at this point in the history
Purpose
=======
The addin use some feature not supported by Internet Explorer.
Show a warning message for those users instead of an infinite load.

Task-2928398
  • Loading branch information
std-odoo committed Aug 10, 2022
1 parent 9c13496 commit a826d40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions outlook/src/taskpane/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ let isOfficeInitialized = false;
const title = 'Odoo for Outlook';

const render = (Component) => {
if (navigator.userAgent.indexOf('Trident') >= 0) {
// Use the addin with Internet Explorer
ReactDOM.render(
<AppContainer>
<div className="warning-message">
This addin is unfortunately not compatible with Internet Explorer. Please try again with another
browser.
</div>
</AppContainer>,
document.getElementById('container'),
);
return;
}

ReactDOM.render(
<AppContainer>
<Component
Expand Down
4 changes: 4 additions & 0 deletions outlook/src/taskpane/taskpane.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
border-bottom: 1px #d6d5d5 solid;
}

.warning-message {
padding: 20px;
}

.tile-regular-space {
height: 30px;
}
Expand Down

0 comments on commit a826d40

Please sign in to comment.