From 63d70bb54a1f381b4bb47a0873f98f0a11c94bde Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Thu, 10 Dec 2015 16:07:35 +0100 Subject: [PATCH] Use original padding in calculation --- src/DebugBar/Resources/debugbar.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DebugBar/Resources/debugbar.js b/src/DebugBar/Resources/debugbar.js index b16c471..4d58a0e 100644 --- a/src/DebugBar/Resources/debugbar.js +++ b/src/DebugBar/Resources/debugbar.js @@ -395,7 +395,8 @@ if (typeof(PhpDebugBar) == 'undefined') { className: "phpdebugbar " + csscls('minimized'), options: { - bodyPaddingBottom: true + bodyPaddingBottom: true, + bodyPaddingBottomHeight: parseInt($('body').css('padding-bottom')) }, initialize: function() { @@ -817,7 +818,8 @@ if (typeof(PhpDebugBar) == 'undefined') { */ recomputeBottomOffset: function() { if (this.options.bodyPaddingBottom) { - $('body').css('padding-bottom', this.$el.height()); + var height = parseInt(this.$el.height()) + this.options.bodyPaddingBottomHeight; + $('body').css('padding-bottom', height); } },