Reputation: 1834
I use simpledialog in jquery mobile app. It works fine when running in normal browser width. But when I reduce screen width less than 250px (apprx.)(Screen width matching mobile) the URL starts appending #&ui-state=dialog with the current URL. And the issue is with the redirection also. One of my button links to other page. And when I clicked on that button it redirects to specified page and return back to current page. But if I do the same once again there wont be any issue. Can anyone help me solve this?
My code for simple dialog is as follows :
$('#create_invoice').append('<div id="temp_div_popup" style="width:80px;position:absolute;top:0px;left:0px;"></div>');
$('#temp_div_popup').simpledialog({
'buttons':{
'Edit':{
click:function () {
operation = 'edit_exist';
if (type == 'item') {
$.mobile.changePage('add_item.html',{
transition : 'none',
allowSamePageTransition : true
});
}
else if (type == 'task') {
$.mobile.changePage('add_task.html',{
transition : 'none',
allowSamePageTransition : true
});
}
$('#temp_div_popup').remove();
}
},
'Delete':{
click:function () {
deleteItemOrTask(type);
$('#temp_div_popup').remove();
}
},
'Cancel':{
click:function () {
$('#temp_div_popup').remove();
},
icon:"delete",
theme:"c"
}
},
'height' :function(){
return '55px;'
},
'width' : function(){
return '140px';
}
});
Upvotes: 0
Views: 257
Reputation: 1834
This issue is generally seen in smaller views only like in mobile phones. It can be simulated by resizing the browser to smaller window. I solved the issue by removing this plugin and adding my own custom dialog window. :)
Upvotes: 1