From aff396015fa48dea32da8b33981af02e9c7fbfb1 Mon Sep 17 00:00:00 2001 From: std-odoo Date: Wed, 10 Aug 2022 13:01:04 +0200 Subject: [PATCH] [FIX] outlook: show a warning message for Internet Explorer users 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 --- outlook/src/taskpane/index.tsx | 14 ++++++++++++++ outlook/src/taskpane/taskpane.css | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/outlook/src/taskpane/index.tsx b/outlook/src/taskpane/index.tsx index b74d213..3df5267 100644 --- a/outlook/src/taskpane/index.tsx +++ b/outlook/src/taskpane/index.tsx @@ -13,6 +13,20 @@ let isOfficeInitialized = false; const title = 'Odoo for Outlook'; const render = (Component) => { + if (navigator.userAgent.indexOf('Trident') >= 0 || navigator.userAgent.indexOf('Edge') >= 0) { + // Use the addin with Internet Explorer + ReactDOM.render( + +
+ This addin is unfortunately not compatible with Internet Explorer. Please try again with another + browser. +
+
, + document.getElementById('container'), + ); + return; + } + ReactDOM.render(