An additional padding-top is being added to the body tag whenever we use data-offset-top tag. After some debugging I realised that the value of padding-top that is being added is the largest of of the data-offset-top tag values in the template.
I think that line that is adding padding-top to the body tag is core/modules/toolbar/js/views/BodyVisualView.js on line no 49 using the code
.css('padding-top', this.model.get('offsets').top)
and looks like function adjustPlacement:
is changing the tray margin at line no 247 using the code
$trays.css('margin-top', this.$el.find('.toolbar-bar').outerHeight());
Since I am not well versed in Backbone and how it is used, I was not able to dig further. Hope it will help somebody else in fixing this issue.
Comment | File | Size | Author |
---|---|---|---|
Screenshot from 2015-09-14 14:14:41.png | 34.08 KB | gokulnk |
Comments
Comment #2
elandirayan CreditAttribution: elandirayan as a volunteer commentedHi Gokul,
Could not able to reproduce this issue. could you please provide the steps to replicate.
#sprintweekend2016
Thanks
Elan
Comment #10
nod_Thanks the issue is pretty clear with offcanvas now, have a look at the
/off-canvas-test-links
from the test moduleoff_canvas_test
module.Closing this issue since we'll handle the fix over at #2958478: Toolbar height calculation is faulty in multiple cases. Added the credits on the other issue. Thanks!