locked
win-backbutton multiple responses

    General discussion

  • Discovered this the other day and since it was so perplexing thought I would pass this on. The scenario is this: windows 8, html5, javascript, template used in VS is navigator.

    The problem arose when from page1 I navigated to page2 and when I tried to use the win-backbutton it would take me back on the first click ok but then if I chose other objects from page1 and navigate again to page2 it would now take two clicks of the back button to get back to page1 - adding one more click every time I did this. Very frustrating. Upon quiet contemplation it was the eventlistener that needed to be removed at the end of each trip to the javascript that was the culprit. This also solved many other quirks that were occurring. Hope this is helpful,

    Thursday, June 13, 2013 3:39 PM

All replies

  • Hi,

    thanks for sharing your solution and experience with us, We actively monitor forum conversations in an effort to receive feedback that helps us continually improve our products, if you have anything urgent in your future programming, and welcome to post your question on our forum again.

    BestRegards

    Friday, June 21, 2013 9:15 AM
    Moderator
  • Discovered this the other day and since it was so perplexing thought I would pass this on. The scenario is this: windows 8, html5, javascript, template used in VS is navigator.

    The problem arose when from page1 I navigated to page2 and when I tried to use the win-backbutton it would take me back on the first click ok but then if I chose other objects from page1 and navigate again to page2 it would now take two clicks of the back button to get back to page1 - adding one more click every time I did this. Very frustrating. Upon quiet contemplation it was the eventlistener that needed to be removed at the end of each trip to the javascript that was the culprit. This also solved many other quirks that were occurring. Hope this is helpful,


    Yes, watch for the evenlisteners that you add in ready() and remove needed ones in unload().

    http://endorsay.com

    Friday, June 21, 2013 10:32 AM
  • How can I determine if an event has been removed or not? And by calling the removeEventListener in different function (besides unload() ), will it remove the event?
    Wednesday, September 4, 2013 8:23 AM