I'm doing an application using phonegap and nova framework. I have problems when i call a page from another page. I have three pages: From the home page, touch in a button and go to the Page 1. In the Page 1 I have a header with two buttons (back and configuration). The back button goes to Home page and the configuration button goes to Page 2. In page two i have a headar (in the same position than page 1) and a button to close and return to page 1. When I touch the close button the page 2 should go to Page 1 but however goes to page 2 but very fast, the page 1 is closed and returns to Home.
The events are different and are in different pages. The names buttons are different.
But not always does this, sometimes (depends on how it touches) works well.
I don't know how to fix and I need help.
Event from Page 1:
nova.touch.bindClick("#btnBack", function() {
var page = new nova.Page("pages/home.html");
page.needAddingToHistory = true;
atApp.gotoPage(page);
});
nova.touch.bindClick("#btnConf", function() {
var page = new nova.Page("pages/page2.html");
page.needAddingToHistory = true;
atApp.gotoPage(page);
});
Button Page 1:
<div id="btnBack" class="btn-left btn-cancel">
<span><i class="fa fa-angle-left"></i>Back</span>
</div>
<div id="btnConf" class="btn-right">
<span><i class="fa fa-cog"></i></span>
</div>
Event Page 2
nova.touch.bindClick("#btnClose", function() {
var page = new nova.Page("pages/page1.html");
page.needAddingToHistory = true;
atApp.gotoPage(page);
});
Button Page 2:
<div id="btnClose" class="btn-left btn-cancel">
<span>Back</span>
</div>