Replace modal contents if already open to avoid window flickering

This commit is contained in:
Frederic Guillot 2017-02-18 19:52:08 -05:00
parent 2751b200d5
commit 93c05371a8
2 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -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) {