Skip to content

Switching elements does not update positions correctly #52

@Kilian

Description

@Kilian

Describe the bug
I have a site where I have a sidebar that people can toggle between being shown on the right and on the bottom. When I toggle between these by changing the element from Space.RightResizable to Space.BottomResizable, the new situation is calculated as if the old sidebar was still in place.

To Reproduce
See https://codesandbox.io/s/festive-mcclintock-pujdo Press "Toggle side" a few times, and see the sidebar eat away more and more of the main content.

Expected behavior
I expect the sidebar to be placed in accordance to the surrounding Space.Viewport without taking into account the old sidebar element.

Strangely enough, when you switch between a Space.RightResizable and no element (<> </>) the calculation does use the "new" situation".

Desktop (please complete the following information):

  • OS: [e.g. iOS] Ubuntu
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 78

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions