locked
Is it a bug of WinJS.Navigation.navigate?

    Question

  • Hello, dear all,

    I am now working on a Metro app, and I've encountered a very strange issue. If WinJS.Navigation.navigate is called successively twice or more times, only the first one will succeed. All the other calls will surely fail, and the error is "NotFoundError". After that if I want to navigate to any page, the following phenomena will appear: a)the previous page will not disappear, namely, some elements in the previous page could still be seen when I navigated to the new page; b) some buttons on the new page could not be displayed correctly and also could not work properly. For example, the cancel button will only display a black rectangle. The caption "Cancel" could not be displayed and the click event couldn't be triggered.

    I don't know how this happen. Would you all please give me some advice? Sincerely thank you all very much.

    PS: I am using the single-page navigation.

    Friday, April 12, 2013 1:36 AM

Answers

  • Hello, Prashant, my question is very similar with the one http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/f26ef427-7a8a-4082-a00d-f57fb64351aa/. The difference is that I am calling WinJS.Navigation.navigate too fast when calling inside a page containg a ListView. If the previous navigation has not completed yet (we could print some logs in the success and error handlers of WinJS.Navigation.navigate), then a second navigation is requested, it will fail. After that if I call WinJS.Navigation.navigate later, the navigation will succeed but some buttons could not work properly, for example, the button caption could not be displayed, or the click event handler could be triggered.

    I am sorry that I could share the code at present, nor could I made a sample code. So if I have not made myself understood, I will post a thread later after I could make out a sample. Thanks.

    • Marked as answer by B0L Friday, April 26, 2013 12:26 PM
    Sunday, April 14, 2013 2:48 AM

All replies

  • Can you post your sample repro to SkyDrive? That way it will be easier to understand what exactly is happening.

    @prashantphadke || Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog! http://aka.ms/t4vuvz

    Friday, April 12, 2013 6:53 PM
    Moderator
  • Hello, Prashant, my question is very similar with the one http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/f26ef427-7a8a-4082-a00d-f57fb64351aa/. The difference is that I am calling WinJS.Navigation.navigate too fast when calling inside a page containg a ListView. If the previous navigation has not completed yet (we could print some logs in the success and error handlers of WinJS.Navigation.navigate), then a second navigation is requested, it will fail. After that if I call WinJS.Navigation.navigate later, the navigation will succeed but some buttons could not work properly, for example, the button caption could not be displayed, or the click event handler could be triggered.

    I am sorry that I could share the code at present, nor could I made a sample code. So if I have not made myself understood, I will post a thread later after I could make out a sample. Thanks.

    • Marked as answer by B0L Friday, April 26, 2013 12:26 PM
    Sunday, April 14, 2013 2:48 AM