Toolbar Anti-flicker seems to be conflicting with Bootstrap 8.x-3.0-rc2 theme (https://www.drupal.org/project/bootstrap).
Bootstrap appends style="top-padding:80px" to the <body>
tag but when Toolbar Anti-flicker is enabled, the style bootstrap adds to body tag disappears and Toolbar Anti-flicker appends style="height:400px" to <div id="toolbar-administration">
. This obviously causes a large gap between the admin toolbar and the page.
As an example, this is what Toolbar Anti-flicker adds style="height: 400px;"
:
<div id="toolbar-administration" class="toolbar toolbar-oriented" aria-label="Site administration toolbar" role="group" style="height: 400px;">
Whereas on other theme as such Bartik, Toolbar Anti-flicker adds height="80px", not height="400px". And this is fine.
I'm not entirely sure if this is a bootstrap issue or Toolbar Anti-flicker?
Comments
Comment #3
droplet CreditAttribution: droplet commentedThank You!
Yes, it's Toolbar Anti-flicker bug. More accurately, it's a CORE bug.
Toolbar Anti-flicker is working with pre-made CSS Style. (and try not to make any new style changes with JS.) Bootstrap overrides Toolbar CSS in a less strict way that was changing the behaviors. (Trigged extra JS executions)
It's a code design pattern problem in Drupal.toolbar.BodyVisualView.
We shouldn't put all eggs in one bucket :)
Comment #4
onejam CreditAttribution: onejam commentedThank you for the fix. I can confirm it is fixed on Drupal 8.1.x
I also tested it against Drupal 8.2.0-beta but found it didn't work on this newer version.
Comment #5
droplet CreditAttribution: droplet commentedI have a quick test and it still working well :) There're no code changes between D8.2 & 8.1 of Core's Toolbar Module.
Have you clear caches after the upgrade?
Comment #6
onejam CreditAttribution: onejam commentedThat was odd. I had to clear a few times and then it worked. So yes, it is wokring on D8.2 as well.
Thanks,
Comment #7
droplet CreditAttribution: droplet commentedIt maybe not the Drupal issue. If you're using Chrome, try to close it completely next time. I found that sometimes don't clear cache correctly.