Browse Source

Merge pull request #2062 from canton7/feature/issue-2041

Allow #editIgnores to scroll in browser (fixes #2041)
Audrius Butkevicius 10 years ago
parent
commit
00bebc317e
1 changed files with 13 additions and 11 deletions
  1. 13 11
      gui/scripts/syncthing/core/controllers/syncthingController.js

+ 13 - 11
gui/scripts/syncthing/core/controllers/syncthingController.js

@@ -1230,17 +1230,19 @@ angular.module('syncthing.core')
                 .success(function (data) {
                 .success(function (data) {
                     data.ignore = data.ignore || [];
                     data.ignore = data.ignore || [];
 
 
-                    $('#editFolder').modal('hide');
-                    var textArea = $('#editIgnores textarea');
-
-                    textArea.val(data.ignore.join('\n'));
-
-                    $('#editIgnores').modal()
-                        .on('hidden.bs.modal', function () {
-                            $('#editFolder').modal();
-                        })
-                        .on('shown.bs.modal', function () {
-                            textArea.focus();
+                    $('#editFolder').modal('hide')
+                        .one('hidden.bs.modal', function() {
+                            var textArea = $('#editIgnores textarea');
+
+                            textArea.val(data.ignore.join('\n'));
+
+                            $('#editIgnores').modal()
+                                .one('hidden.bs.modal', function () {
+                                    $('#editFolder').modal();
+                                })
+                                .one('shown.bs.modal', function () {
+                                    textArea.focus();
+                                });
                         });
                         });
                 })
                 })
                 .then(function () {
                 .then(function () {