npr / responsiveiframe

Responsive IFrames

Home Page:http://npr.github.com/responsiveiframe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

persistent 10-ish px scroll bar area on resize

joshp23 opened this issue · comments

This script performed well in my project with the exception of an apx 10 to 20 extra pixels that would always overflow vertically, resulting in a scroll bar with a very small scroll area, regardless of the size of the responsive frame's contents. To fix this, I had to change line 82 from

    elem.css('height', height + 'px');

to this

    elem.css('height', (height+20) + 'px');

I confirm the issue. Another option to fix it (on the client side!) is to change 120 line from
var h = document.body.offsetHeight;
to
var h = document.body.offsetHeight + 20;