Search code examples
javascripthtmlwindows-store-appswindows-phone-8.1winjs

Hub/Pivot App template breaks when navigated


I using universal app model, Hub/Pivot App template. There's some bug with template.

When I navigate from hub.html to other html-page (created as PageControl) and go back then Hub/Pivot layout breaks! This pic clearly show you what happens: screenshot.

What I'm doing:
1. Create PageControl as it is written
2. WinJS.Navigation.navigate("/somefolder/somepage.html");


Solution

  • Problem was solved by changing class in CSS-file of page created as PageControl. Here's code we need to edit:

    .fragment {
        -ms-grid-columns: 1fr;
        -ms-grid-rows: 128px 1fr;
        display: -ms-grid;
        height: 100%;
        width: 100%;
    }
    

    Just change class in html- and css-file, for example, to fragment2, and nothing breaks when you navigation back and forward.