I have two canvas apps on the contacts page, but when I resize one app via Sfdc.canvas.client.resize(), the other app resizes as well. My first app is resizing every 500ms to the current contentHeight of that shell, and the second app is resizing just once to a set height of 500px.

What's happening is that the first shell automatically gets resized to 500px as well as the second shell, and when I try to resize the first shell to a different height, it automatically pops back to 500px.

I've checked the client objects for each shell and they have different instanceId's, so I'm unclear as to why the resizing for one shell is interfering with a different shell.

1 Answer 1


One way I can think of doing same is handling resize in the visualforce page than doing the same via client side logic .

Here is the documentation for same

The sample code is as follows

// Set the height and width explicitly and target a canvas app
 // Where 'mycanvas0' is the canvasId on the canvas component 
  // <apex:canvasApp canvasId="mycanvas0"/>
      var target = {canvas : "mycanvas0"};
    Sfdc.canvas.controller.resize( {height : "1000px", width : "900px"}, target);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.