Skip to content

VNavigationManager doesn't work when orientation is changed #422

@vaadin-bot

Description

@vaadin-bot

Originally by @pontusbostrom


The VNavigationManager draws components at an offset from the parent. These offsets seem not to be updated properly (or at all) when the orientation is changed. As a result the current view is not drawn properly starting from the top-left corner, but starting from some offset. As a work around, I used a resizeHandler that does:

            Widget p = navigationManager.getPreviousView();
            Widget n = navigationManager.getNextView();
            navigationManager.setPreviousWidget(null);
            navigationManager.setNextWidget(null);
            navigationManager.setCurrentView(currentView);
            navigationManager.resetPositionsAndChildSizes();
            navigationManager.setPreviousWidget(p);
            navigationManager.setNextWidget(n); 

This works but it is a bit cumbersome.


Imported from https://dev.vaadin.com/ issue #20389

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions