Skip to content

Commit

Permalink
fixed window fix bar in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pesektomas committed Jan 30, 2020
1 parent 3439b94 commit 6c992b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/framework/assets/js/admin/components/fixedBar.js
Expand Up @@ -14,6 +14,11 @@ export default class FixedBar {
static init () {
SymfonyToolbarSupport.registerOnToolbarShow(FixedBar.onSymfonyToolbarShow);
SymfonyToolbarSupport.registerOnToolbarHide(FixedBar.onSymfonyToolbarHide);

// condition copied from: vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
if (typeof Sfjs !== 'undefined' && Sfjs.getPreference('toolbar/displayState') !== 'none') {
SymfonyToolbarSupport.notifyOnToolbarShow();
}
}
}

Expand Down
Expand Up @@ -35,11 +35,6 @@ export default class SymfonyToolbarSupport {
$('.sf-toolbar').on('click', '[id^="sfToolbarMainContent-"] > a.hide-button', () => {
SymfonyToolbarSupport.notifyOnToolbarHide();
});

// condition copied from: vendor/symfony/symfony/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
if (typeof Sfjs !== 'undefined' && Sfjs.getPreference('toolbar/displayState') !== 'none') {
SymfonyToolbarSupport.notifyOnToolbarShow();
}
}
}

Expand Down

0 comments on commit 6c992b7

Please sign in to comment.