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); }