From 2cb233319da422c9f003e8687d686e96a92be489 Mon Sep 17 00:00:00 2001 From: Nick Veys Date: Sat, 17 Sep 2011 14:47:38 -0500 Subject: [PATCH] Adding flag to prevent backdrop click hiding modal --- docs/javascript.html | 6 +++ js/bootstrap-modal.js | 7 +++- js/tests/unit/bootstrap-modal.js | 64 +++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/docs/javascript.html b/docs/javascript.html index f001ad8083..e0d85f25a7 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -105,6 +105,12 @@ false Includes a modal-backdrop element + + backdropClickHides + boolean + true + A click on the modal-backdrop element hides the modal + keyboard boolean diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index da67060731..98e5d43015 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -133,8 +133,10 @@ , animate = this.$element.hasClass('fade') ? 'fade' : '' if ( this.isShown && this.settings.backdrop ) { this.$backdrop = $('