From 58867a5afe24b0dd9a8c470b76b9585eabbb9879 Mon Sep 17 00:00:00 2001 From: Boris Aranovich Date: Tue, 5 Jun 2018 17:52:47 +0300 Subject: [PATCH] Precaution against iframe creating blank space on the page (#637) Since the notification bar is added inside of the active page, page specific styles may override how the iframe is rendered in an undesirable way. I came across this when logging in an internal corporate web-app we're using which for some reason has a global css setting of `iframe { min-height: 349px }` because nobody anticipated that 3rd party DOM elements would be injected to the page. This modification should have no impact other than negating these global styles. --- src/content/notificationBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index d350fd4f90..2967452c12 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -387,7 +387,7 @@ document.addEventListener('DOMContentLoaded', (event) => { const barPageUrl: string = isSafari ? (safari.extension.baseURI + barPage) : chrome.extension.getURL(barPage); const iframe = document.createElement('iframe'); - iframe.style.cssText = 'height: 42px; width: 100%; border: 0;'; + iframe.style.cssText = 'height: 42px; width: 100%; border: 0; min-height: initial;'; iframe.id = 'bit-notification-bar-iframe'; const frameDiv = document.createElement('div');