From 757ae7a3ad86e547ac01759e9cb6680e7a9f0a2b Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 1 Feb 2017 12:19:54 +0100 Subject: [PATCH] Fix a cross origin frame issue with dropdowns --- www/common/cryptpad-common.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index cd600f5dd..1f11e2783 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1025,9 +1025,13 @@ define([ e.stopPropagation(); var state = $innerblock.is(':visible'); $('.dropdown-bar-content').hide(); - $('iframe').each(function (idx, ifrw) { - $(ifrw).contents().find('.dropdown-bar-content').hide(); - }); + try { + $('iframe').each(function (idx, ifrw) { + $(ifrw).contents().find('.dropdown-bar-content').hide(); + }); + } catch (e) { + // empty try catch in case this iframe is problematic (cross-origin) + } if (state) { $innerblock.hide(); return;