Dante 11 years ago
parent
commit
8b7b82cbb9

+ 1 - 1
bower.json

@@ -1,7 +1,7 @@
 {
     "name": "bootstrap3-dialog",
     "description": "Make use of Bootstrap Modal more monkey-friendly. http://nakupanda.github.io/bootstrap3-dialog/",
-    "version": "1.33.3",
+    "version": "1.33.4",
     "keywords": [
         "css",
         "js",

+ 3 - 0
changelog.txt

@@ -2,6 +2,9 @@ LASTEST NOT RELEASED
 ------------------------------
 * NONE so far *
 
+V1.33.4
+------------------------------
+* RE-FIXED #56 *
 
 V1.33.3
 ------------------------------

+ 2 - 4
dist/js/bootstrap-dialog.js

@@ -764,10 +764,11 @@
                 var dialog = event.data.dialog;
                 typeof dialog.options.onhidden === 'function' && dialog.options.onhidden(dialog);
                 dialog.isAutodestroy() && $(this).remove();
+                BootstrapDialog.moveFocus();
             });
 
             // Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.
-            this.getModal().on('mouseup', {dialog: this}, function(event) {
+            this.getModal().on('click', {dialog: this}, function(event) {
                 event.target === this && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close();
             });
 
@@ -872,9 +873,6 @@
             }
             this.setOpened(false);
 
-            // Move focus to the last visible dialog.
-            BootstrapDialog.moveFocus();
-
             // Show scrollbar if the last visible dialog needs one.
             BootstrapDialog.showScrollbar();
 

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrap-dialog.min.js


+ 2 - 4
examples/assets/bootstrap-dialog/js/bootstrap-dialog.js

@@ -764,10 +764,11 @@
                 var dialog = event.data.dialog;
                 typeof dialog.options.onhidden === 'function' && dialog.options.onhidden(dialog);
                 dialog.isAutodestroy() && $(this).remove();
+                BootstrapDialog.moveFocus();
             });
 
             // Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.
-            this.getModal().on('mouseup', {dialog: this}, function(event) {
+            this.getModal().on('click', {dialog: this}, function(event) {
                 event.target === this && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close();
             });
 
@@ -872,9 +873,6 @@
             }
             this.setOpened(false);
 
-            // Move focus to the last visible dialog.
-            BootstrapDialog.moveFocus();
-
             // Show scrollbar if the last visible dialog needs one.
             BootstrapDialog.showScrollbar();
 

File diff suppressed because it is too large
+ 1 - 1
examples/assets/bootstrap-dialog/js/bootstrap-dialog.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "bootstrap3-dialog",
-  "version": "1.33.3",
+  "version": "1.33.4",
   "description": "Make use of Bootstrap Modal more monkey-friendly.",
   "private": true,
   "directories": {

+ 2 - 4
src/js/bootstrap-dialog.js

@@ -764,10 +764,11 @@
                 var dialog = event.data.dialog;
                 typeof dialog.options.onhidden === 'function' && dialog.options.onhidden(dialog);
                 dialog.isAutodestroy() && $(this).remove();
+                BootstrapDialog.moveFocus();
             });
 
             // Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.
-            this.getModal().on('mouseup', {dialog: this}, function(event) {
+            this.getModal().on('click', {dialog: this}, function(event) {
                 event.target === this && event.data.dialog.isClosable() && event.data.dialog.canCloseByBackdrop() && event.data.dialog.close();
             });
 
@@ -872,9 +873,6 @@
             }
             this.setOpened(false);
 
-            // Move focus to the last visible dialog.
-            BootstrapDialog.moveFocus();
-
             // Show scrollbar if the last visible dialog needs one.
             BootstrapDialog.showScrollbar();