summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 19:52:08 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 19:52:08 -0500
commit93c05371a882b3c07d16457479129e42a2999492 (patch)
tree8592f47c42728f2944c0f251f9f1264d861221f3 /assets/js/components
parent2751b200d58e591bf0a838de662443c638fa61f8 (diff)
Replace modal contents if already open to avoid window flickering
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/modal.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/js/components/modal.js b/assets/js/components/modal.js
index ce6f34de..c415988e 100644
--- a/assets/js/components/modal.js
+++ b/assets/js/components/modal.js
@@ -12,7 +12,11 @@
});
KB.onClick('.js-modal-medium', function (e) {
- KB.modal.open(getLink(e), 'medium', false);
+ if (KB.modal.isOpen()) {
+ KB.modal.replace(getLink(e));
+ } else {
+ KB.modal.open(getLink(e), 'medium', false);
+ }
});
KB.onClick('.js-modal-small', function (e) {