Permalink
Browse files

feature(js): requiresConfirmation now returns false if not confirmed

fixes #9240
  • Loading branch information...
jdalsem committed Mar 22, 2016
1 parent b96c736 commit cac5c0fd1fa6b8dd5861cbcf7e76efeb6a855714
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/lib/ui.js
View
@@ -290,15 +290,15 @@ elgg.ui.initHoverMenu = function(parent) {
};
/**
- * Calls a confirm() and prevents default if denied.
+ * Calls a confirm() and returns false if denied.
*
* @param {Object} e
* @return void
*/
elgg.ui.requiresConfirmation = function(e) {
var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure');
if (!confirm(confirmText)) {
- e.preventDefault();
+ return false;
}
};

0 comments on commit cac5c0f

Please sign in to comment.