cancel
Showing results for 
Search instead for 
Did you mean: 

gadgets.window.adjustHeight() calculates height of the gadget incorrectly

Former Member
0 Kudos

I am developing a tool for Streamwork using OpenSocial API. I want do adjust the height of the tool dynamically.

My structure is something like this:

<div id="outerDiv" style="height:200px;overflow:auto;">

     <div id="innerDiv">

          Comments are loaded here.

     </div>

</div>

I update the content of the innerDiv every second, and sometimes it's height gets longer than 200px and the outerDiv shows a scroll bar.

In my gadget I have specified <Require feature="dynamic-height"/>. When I usegadgets.windows.adjustHeight() it calculates the height of the content regardless that I have made some part of it hidden through adjusting a height for my outerDiv. For example consider that the height of the innerDiv's content gets to 1000px, then I have a scroll bar in my outerDiv. But when I call the adjustHeight it adjusts the height of the tool to 1000px !!!!. As a result I see a huge white space below my content.

I know that I can specify height for adjustHeight function. But then it means that on every update I have to calculate the height of the gadget myself, and I don't want to do it (if possible).

Can someone explain to me why it happens and how can I solve it ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member26693
Active Participant
0 Kudos

Hello Ali,

We have tested and can confirm that gadgets.window.adjustHeight() is calculating
the height incorrectly. We are currently investigating and debugging and will
update you shorlty on the issue.

 

Regards,

Patrick Dinneen
Support Engineer

 

SAP Cloud Support

Answers (0)