Clicking a button makes all buttons unclickable
I load a new JS file/window from my home screen (app.js) using the following code:
btnSettings.addEventListener('click',function(e)
{
var winSettings = Titanium.UI.createWindow({
url:'pages/settings.js'
});
winSettings.open();
});
I then have a 'Back' button on the settings.js page, this should go back to the app.js screen. I'm using the following code:
btnBack.addEventListener('click',function(e)
{
var winHome = Titanium.UI.createWindow({
url:'../app.js'
});
winHome.open();
});
The home screen does re-open but then nothing is clickable. I have 4 buttons and an adblock, none of which can be interacted with. The console gives me no errors. It's almost as if the page has an invisible overlay on top of it preventing everything from being clickable.
Any help is hugely appreciated.
6 Answers
-
why don't you simply close the window?
btnBack.addEventListener('click',function(e) { Titanium.UI.currentWindow.close(); });
-
I'm not sure. Maybe once you set a js file to a window you cannot reuse it until u close the old window that has it.
-
did you ever figure out that issue? I'm having the same problem
-
did you ever figure out how to fix this? I'm having the same problem
-
Does anyone know how to navigate using a button? its so freaking needed to know but no one seems to have cracked it yet.
-
I think this is because you are actually on another window but you are still seeing the old window as a result it makes unclickable, i am facing the same issue, basically what i did to test it i added a alert on the incoming window so when it loaded it notified me, yet the message came but i was still seeing the old window.
I have a problem with closing the current window and bringing the new window upfront… basically the stacking of the windows isnt working for me.
The Titanium.UI.currentWindow.close/open doesnt seem to be working on my project will be getting errors on the error logs on the Titanium Developer say an undefined object!.
I'd be nice some if some can show us how to get this working!