From 22a6686fbfb722b307e67c7a97a60b2aee764c72 Mon Sep 17 00:00:00 2001 From: Tyler Smalley Date: Thu, 20 Sep 2018 12:03:20 -0700 Subject: [PATCH] Set id on body tag Signed-off-by: Tyler Smalley --- src/ui/public/chrome/chrome.js | 3 +++ src/ui/public/chrome/directives/kbn_chrome.js | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/public/chrome/chrome.js b/src/ui/public/chrome/chrome.js index 57922d39f6136..257224e08baed 100644 --- a/src/ui/public/chrome/chrome.js +++ b/src/ui/public/chrome/chrome.js @@ -83,6 +83,9 @@ const waitForBootstrap = new Promise(resolve => { require('uiExports/chromeNavControls'); require('uiExports/hacks'); + // sets attribute on body for stylesheet sandboxing + document.body.setAttribute('id', `${internals.app.id}-app`); + chrome.setupAngular(); targetDomElement.setAttribute('id', 'kibana-body'); targetDomElement.setAttribute('kbn-chrome', 'true'); diff --git a/src/ui/public/chrome/directives/kbn_chrome.js b/src/ui/public/chrome/directives/kbn_chrome.js index c1af7268f7675..31bdf62646a7f 100644 --- a/src/ui/public/chrome/directives/kbn_chrome.js +++ b/src/ui/public/chrome/directives/kbn_chrome.js @@ -44,8 +44,6 @@ export function kbnChromeProvider(chrome, internals) { const $content = $(require('./kbn_chrome.html')); const $app = $content.find('.application'); - $app.attr('id', `${internals.app.id}-app`); - if (internals.rootController) { $app.attr('ng-controller', internals.rootController); }