mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 10:28:49 -07:00
Allow #editIgnores to scroll in browser (fixes #2041)
class modal-open is applied to <body>, which ultimately means that the browser will scoll to the modal's content. However, #editFolder was finishing its close animation (and removing this modal-open class) after #editIgnores had set modal-open (and had started its open animation). The end result is that <body> ends up without modal-open when #editIgnores is open, and so the browser doesn't properly scroll. Instead, only open the #editIgnores once #editFolder has finished closing.
This commit is contained in:
parent
8fab7ec5e3
commit
8f38e83aaf
@ -1230,17 +1230,19 @@ angular.module('syncthing.core')
|
||||
.success(function (data) {
|
||||
data.ignore = data.ignore || [];
|
||||
|
||||
$('#editFolder').modal('hide');
|
||||
var textArea = $('#editIgnores textarea');
|
||||
$('#editFolder').modal('hide')
|
||||
.one('hidden.bs.modal', function() {
|
||||
var textArea = $('#editIgnores textarea');
|
||||
|
||||
textArea.val(data.ignore.join('\n'));
|
||||
textArea.val(data.ignore.join('\n'));
|
||||
|
||||
$('#editIgnores').modal()
|
||||
.on('hidden.bs.modal', function () {
|
||||
$('#editFolder').modal();
|
||||
})
|
||||
.on('shown.bs.modal', function () {
|
||||
textArea.focus();
|
||||
$('#editIgnores').modal()
|
||||
.one('hidden.bs.modal', function () {
|
||||
$('#editFolder').modal();
|
||||
})
|
||||
.one('shown.bs.modal', function () {
|
||||
textArea.focus();
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(function () {
|
||||
|
Loading…
Reference in New Issue
Block a user