简体   繁体   中英

vaadin responsive not working properly

I'm using new Version of Vaadin which is 8.0.6

if I open my window on width-range~="1400px-" and go down to width-range~="0px-760px", responsive css properties works fine, but not on the other way, If open the window on width-range~="0px-760px" and go to width-range~="1200px-" nothing happens.

My observations showed that when the window is minimized vaadin injects the property "width-range=[...]" into HTML code to make it responsive. But when the window is maximized the property "width-range=[...]" stay here consequently this disrupts the display.

How can i do to update or delete the property "width-range=[...]" when I make the width window bigger?

i've had this code :

private Component buildLoginForm() {
    final VerticalLayout loginPanel = new VerticalLayout();
    loginPanel.setSpacing(false);
    loginPanel.setSizeUndefined();
    Responsive.makeResponsive(loginPanel);
    loginPanel.addStyleName(Configuration.Style.LOGIN_PANEL);

    loginPanel.addComponent(buildFields());
    loginPanel.addComponent(buildPasswordBtn());
    LabelIh3m hrLbl = new LabelIh3m();
    hrLbl.addStyleName("hr");
    loginPanel.addComponent(hrLbl);
    loginPanel.addComponent(buildNewAccount());
    return loginPanel;
}

I don't know why but problem was this line : loginPanel.setSizeUndefined();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM