You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am finding that the height of the child is not always detected properly by firefox. with this plugin using the body scrollHeight at times returns a wrong value -- finding this with version 15.0 of FF.
after my multiple test (before i started using this plugin -- which rocks!), i am finding its best to test for at least two different ways to get the height, and grab the largest value of both -- this way preventing content being cut off in many cases too short. i have found this works best for FF and IE.
not sure how to submit a patch, so here is the code:
varlargestHeight;varnewHeight;// different methods to get the height, browsers return differnt valuesvarheights={bodyScrollHeight: $(iframe,window.top.document).contents().find('body')[0].scrollHeight,htmlHeight: $("html",iframe.contentWindow.document).height()};// test different heights and return the largestfor(varkeyinheights){if(typeoflargestHeight=='undefined'){largestHeight=heights[key];}elseif(heights[key]>largestHeight){largestHeight=heights[key];}if(options.diagnostics){debug(key+": "+heights[key]);}};newHeight=largestHeight+options.heightOffset;
this seems to solve inconsistencies with method to acquire height. i am not using the straight up dom height ( ...document).height() ) since it can return absurdly large numbers -- but getting the height of html & body seem to work rather well.
The text was updated successfully, but these errors were encountered:
i am finding that the height of the child is not always detected properly by firefox. with this plugin using the body scrollHeight at times returns a wrong value -- finding this with version 15.0 of FF.
after my multiple test (before i started using this plugin -- which rocks!), i am finding its best to test for at least two different ways to get the height, and grab the largest value of both -- this way preventing content being cut off in many cases too short. i have found this works best for FF and IE.
not sure how to submit a patch, so here is the code:
instead of:
i have this:
this seems to solve inconsistencies with method to acquire height. i am not using the straight up dom height ( ...document).height() ) since it can return absurdly large numbers -- but getting the height of html & body seem to work rather well.
The text was updated successfully, but these errors were encountered: