You might want to check out https://stackoverflow.com/a/15929161/1178968
"Set a time interval to show the dialog, rather than call it once the page is shown." - Omar
$(document).on('pageshow', '#myPage' ,function () {
if (getValue() == null) {
setTimeout(function () {
$.mobile.changePage('#dialog');
}, 100); // delay above zero
}
});