cordova-plugin-dialogs icon indicating copy to clipboard operation
cordova-plugin-dialogs copied to clipboard

feat: set cancelable to false by default on Android

Open RomainFallet opened this issue 9 years ago • 7 comments

To match with the iOS behavior where all modals cannot be canceled by a click outside of it (or a back button). First of all, there is few case where it is interesting for the developper to let the user dismiss the modal by a simple click outside of the modal. And it's absolutely not user friendly, the user does not attempt to see the modal closing after this action. He can cancel it unintentionally.

Maybe a setting would be a great solution too ?

Here some testimonies of developers that have trouble with this (not only with cordova) : https://github.com/jquery/jquery-mobile/issues/4727 http://stackoverflow.com/questions/23300122/prevent-phonegap-notification-navigator-popups-from-closing-from-touch-outside-o http://programming.nullanswer.com/question/27626010 http://iswwwup.com/t/5fcbb227c8f7/javascript-prevent-kendo-tooltip-hide-close-when-clicking-outside-the-tooltip.html

RomainFallet avatar Aug 12 '15 10:08 RomainFallet

++

kavka3 avatar Sep 29 '15 16:09 kavka3

++ It's easy to tap outside of the box unintentionally. Also you may wonder what happens if you tap outside instead of clicking OK/Cancel (did I just OKed or Cancelled it?). I'm actually already using a modified version of this plugin just to change that setCancelable part.

@RomainFallet maybe you could simply update the calls to alert, confirm, ... and add another argument isCancelable that would default to false as to not change the current behavior on Android. Maybe people don't want to merge the PR as it's not backward compatible?

Heshyo avatar Oct 30 '15 09:10 Heshyo

I just saw https://github.com/apache/cordova-plugin-dialogs/pull/60 that actually added a setCanceledOnTouchOutside. I don't know if both setCanceled and setCanceledOnTouchOutside should be set (in my app I only use setCanceled(false) and it prevents both back button and clicking outside to close the dialog).

Heshyo avatar Oct 30 '15 09:10 Heshyo

++

roushd5 avatar Aug 18 '16 15:08 roushd5

++ Please...

darron1217 avatar Jan 03 '17 06:01 darron1217

any news on it?

MaxInMoon avatar Jan 12 '18 17:01 MaxInMoon

Any news?

goran-blazin avatar Feb 14 '19 15:02 goran-blazin