Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
uncaught exception: pushPage is already running.
-
Hi,
I’m constantly getting this error:
uncaught exception: pushPage is already running.
I have been trying to figure this out and find the source of it for over 5 hours and I can’t and I’m pulling my hair out!
I’m simply using this code to change pages:
document.querySelector('#myNavigator').pushPage('individual.html',{animation:'slide'});
Could someone please advice on this issue?
-
@David-Hope that exception is thrown if the navigator is still trying to execute some previous action when you push. What you provided is not enough to figure out why that’s happening in your specific case. Can you show us some more of your code? Or maybe try to reproduce the issue in the tutorial app.
-
@misterjunio I just figured it out.
When I use inline onclick events to navigate to another page using pushPage, everyhting works fine but when I use a global click event that error pops up again.
That is very strange.
Any particular reason for it?
-
@David-Hope My guess would be more than one element is triggering
click
, so you have more than one “simultaneous” call topushPage
and hence the error.
-
@David-Hope What do you mean with a “global” click event? Perhaps you are setting that event more than once.
-
@David-Hope Are you selecting the element by class name ? If so, it might be similar to my problem where the DOM elements of previously pushed pages are still present but only hidden.
If you’re using jQuery, try doing
$('.yourClass:last').on...
and see if the problems persists.
-
@Fran-Diox I create a click function for the class name.
example:
$('.className).on...
@4dnan Yeah, using the class name… i thought about using your suggestion lastnight but I totally forgot about it lol… Clever idea that is…