appframework icon indicating copy to clipboard operation
appframework copied to clipboard

Multiple views/pages navigation fails by displaying the incorrect page

Open jvence opened this issue 9 years ago • 10 comments

I have come across what I think is a major bug in version 3.0's navigation functionality. Firstly, it seems that pages maintain an 'active' status even when the user navigates to another page. Consequently, this leads to problems when a user revisits a page leading to the wrong page being displayed.

I am attaching a file that illustrates this problem. Simply install Kitchen sink, copy test.html to top directory and following instructions: https://drive.google.com/open?id=0B2LCeg8SYplUZ2pOekswRlk1bG8

Notice how on revisiting a page, the correct header is shown but the incorrect page content is displayed.

jvence avatar May 18 '15 10:05 jvence

As you can see below both pages have an 'active' class

<div class="pages">
                <div id="test1" class="panel active" data-title="Sub1" style="z-index: 1;">
                    Subpage 1
                </div>
                <div id="test2" class="panel active" data-title="Sub2" style="z-index: 1;">
                    Subpage 2
                </div>
            </div>

The way to fix this is to remove the 'active' status of a page when the user navigates away from it

jvence avatar May 18 '15 10:05 jvence

We keep active classes when switching from different views. I won't have time to look into your issue, hopefully someone else can help!

imaffett avatar May 18 '15 11:05 imaffett

I realize you keep active classes but if different pages within the same view is hit twice, both pages maintain a 'active' status and the third view shows the wrong page (it basically shows the last active page, regardless of which page within the view is requested)

jvence avatar May 18 '15 13:05 jvence

I ran into the same issue. seems like someone posted a pull request on the issue in April. https://github.com/01org/appframework/pull/850

the update to af.ui.js adds to the runTransition function and removes the active class if found. it works, but it requires a transition to be set when calling the panels, and not sure if it's the best solution.

rvacca2 avatar May 18 '15 21:05 rvacca2

Not sure that timer to remove the 'active' status of a page is the best approach. Perhaps a function that is called when a page a navigated to that automatically removes 'active' from other pages within the same view.

jvence avatar May 19 '15 07:05 jvence

I won't have time to look into this for a month (vacation and other priorities). If someone has a fix, please submit a pull request WITH EXAMPLES of the error and the fix

imaffett avatar May 19 '15 11:05 imaffett

Is anyone else at Intel working on this or is this a one man show? Trying to visit http://app-framework-software.intel.com now shows "The page cannot be displayed because an internal server error has occurred."

jvence avatar May 20 '15 08:05 jvence

@jvence - the server is maintained by the infrastructure team for HTML5 tools. I've pinged them to ask what's going on. Thanks for the heads up.

imaffett avatar May 20 '15 11:05 imaffett

Sorry but my concern was more with the bug reported rather then the server. Is this framework actively maintained? Are you the only person working on fixing bugs? Thanks

jvence avatar May 26 '15 09:05 jvence

You can view the commit log - https://github.com/01org/appframework/commits/master

imaffett avatar May 26 '15 11:05 imaffett