summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-26 21:29:01 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-28 23:41:37 -0300
commit2d071792c5146818a2338c95b17201140c5e8e61 (patch)
treec7ac9969e7c69ed22d599de024ca21d26afb940a /settings/js
parent46079162cdfa9846de36b0461e450bb5bcd028c8 (diff)
downloadnextcloud-server-2d071792c5146818a2338c95b17201140c5e8e61.tar.gz
nextcloud-server-2d071792c5146818a2338c95b17201140c5e8e61.zip
only close verification dialog if the user clicks outside of the dialog
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/personal.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index cbfe4b1e9af..d60f08c47b5 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -225,18 +225,17 @@ $(document).ready(function () {
});
- $("body").click(function(){
- var page = $(this);
- page.find('.verification-dialog').css('display', 'none');
- });
-
- // When the user clicks anywhere outside of the modal, close it
- window.onclick = function(event) {
- var dialog = document.getElementById('verification-dialog');
- if (event.target === dialog) {
- dialog.style.display = "none";
+ // When the user clicks anywhere outside of the verification dialog we close it
+ $(document).click(function(event){
+ var element = event.target;
+ var isDialog = $(element).hasClass('verificationCode')
+ || $(element).hasClass('explainVerification')
+ || $(element).hasClass('verification-dialog-content')
+ || $(element).hasClass('verification-dialog');
+ if (!isDialog) {
+ $(document).find('.verification-dialog').css('display', 'none');
}
- };
+ });
var federationSettingsView = new OC.Settings.FederationSettingsView({