cordova-plugin-dialogs prevent "click" outside -
i using cordova-plugin-dialogs plugin mobile app. dialog can displayed via this:
$cordovadialogs.confirm('we not reach server. please try again.', 'network problem', ['cancel','retry']) .then(function(buttonindex) { if(buttonindex==2){ checknetwork(); }else{ navigator.app.exitapp(); } });
it works, problem when user "click" outside dialog, dialog disappear , trigger result of 0
, app exit. how can disable ability "click" outside of dialog?
the plugin works way, you'll have fork plugin, change behaviour , install fork instead of official plugin.
there few lines allows cancel dialog when press outside, you'll have change them from
dlg.setcancelable(true);
to
dlg.setcancelable(false);
Comments
Post a Comment