Skip to content

Commit 91eeea3

Browse files
committed
Fix bootstrap by multiple fade in header dialog
1 parent 6d5ae03 commit 91eeea3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

js/header_dialog.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,13 +810,23 @@ function HeaderDialog(dialog, onSave) {
810810
// Public variables
811811

812812
this.show = function(sysConfig) {
813-
dialog.modal('toggle');
814-
if (dialog.data('bs.modal').isShown) {
813+
814+
// Workaround to pressing the shortcut key multiple times
815+
// The modal-backdrop isn't removed
816+
// Remove it manually
817+
dialog.one('hidden.bs.modal', function() {
818+
$('.modal-backdrop').remove();
819+
});
820+
821+
dialog.one('show.bs.modal', function() {
815822
renderSysConfig(sysConfig);
816823
// Disable changing input and dropdowns
817824
$('#dlgHeaderDialog input').prop('disabled', 'disabled');
818825
$('#dlgHeaderDialog select').prop('disabled', 'disabled');
819-
}
826+
});
827+
828+
dialog.modal('toggle');
829+
820830
}
821831

822832
// Buttons

0 commit comments

Comments
 (0)