From e56cc49f79ecaf175fee9bf0ee7ad309ce2ec69d Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 5 Jan 2017 14:14:26 +0100 Subject: [PATCH] catch errors that popped up because of a cross-origin iframe --- www/common/toolbar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 511ee3138..260e7d22d 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -506,12 +506,17 @@ define([ }; $(config.ifrw).on('click', removeDropdowns); $(config.ifrw).on('click', cancelEditTitle); + + try { if (config.ifrw.$('iframe').length) { var innerIfrw = config.ifrw.$('iframe').each(function (i, el) { $(el.contentWindow).on('click', removeDropdowns); $(el.contentWindow).on('click', cancelEditTitle); }); } + } catch (e) { + // empty try catch in case this iframe is problematic + } } // Update user list