In our canvas App, we have the following code, where sfsrjson is the signed request JSON:
<script type="text/javascript">
Sfdc.canvas(function() {
Sfdc.canvas.client.resize(sfsrjson.client);
Sfdc.canvas.client.autogrow(sfsrjson.client);
});
</script>
We have a page that is configurable by the end user by adding widgets to the page. If they add a large number of widgets, the page could end up with a large height. In one instance, we have a user that is generating a page with a height of nearly 2200px. However, the resize/autogrow is only growing the page to 2000px.
If I use Chrome's Inspect Element feature and change the height of the canvas iframe do a larger value, such as "2500", the iframe will render the full page. However, if I then use the Chrome Javascript console to call the canvas resize function, it again sets the height of the iframe to 2000px. I haven't been able to find any documentation for a canvas height limit.
Even if I execute the following code, I still get a max of 2000px:
<script type="text/javascript">
getPageHeight = function() {
return Math.max($(document).height()
, $(window).height()
, document.documentElement.clientHeight);
};
Sfdc.canvas.client.resize(sfsrjson.client, {
height: getPageHeight() + "px"
});
</script>
getPageHeight properly returns the height of the page at the 2200ish px, however, the resize is still only setting the height of the canvase frame to 2000px.
How do I get canvas to show my whole page?