Screen issue on group box expansion

Cuba platform version - 7.1.6

The screen contains 13 group boxes one above the other. Every group box is created with these same attributes but different captions -
< groupBox caption=“GB1” spacing=“true” collapsable=“true” collapsed=“true” width=“100%”>…SomeContent…</ groupBox>

Issue is every time I expand a group box, whole screen auto scrolled itself to bottom of page. Then I have to scroll up to reach group box which I opened. Same thing happens when I collapse an opened group box. Whole screen scrolls to bottom.
This issue exists for both types of group boxes- whose content is greater and smaller than screen size .

As you can see in screenshot below - I clicked on GB4 group box to expand it and whole screen scrolled to bottom of page -

Clicked on GB4 group box to expand it -

Screen automatically scrolled to bottom of page -

Is this cuba platform bug or I need to do any changes in my code ?

Hello!

Try to place your groupBox-es to scollBox:

<layout spacing="true"
        expand="scrollBox">
    <scrollBox id="scrollBox"
               width="100%"
               spacing="true">
        <groupBox id="group1" caption="group1" collapsable="true">
           ...
        </groupBox>

        ...

    </scrollBox>
</layout>

The GroupBox code works fine. This behavior depends on the “expand” function in the layout (vbox, etc.) because the Vaadin layout phase resizes the layout, which causes it to scroll down.

1 Like