diff --git a/APPL/Localscripts/iface.js b/APPL/Localscripts/iface.js index a201e8a57f..5c1266b7f7 100644 --- a/APPL/Localscripts/iface.js +++ b/APPL/Localscripts/iface.js @@ -640,7 +640,9 @@ $(function () { var w = $(window).width(); var p = $(this).position(); var smallsize = $(this).data("smallsize"); - if (p.top > 20) // shifted to next line? + var pheader = $(this).closest('div.fcltheader'); + var headertop = pheader.length?pheader.position().top:0; + if (p.top > headertop + 20) // shifted to next line? { $(this).addClass("smallbuttons") .data("smallsize", Math.max(w, smallsize||0))