From 7a17e70dd6c5c96294d204982c305d1e5eed63b8 Mon Sep 17 00:00:00 2001 From: Pablo Molina Date: Wed, 26 Apr 2017 19:43:11 +0200 Subject: [PATCH] Disable refreshing for non active/animated modals This commit solves #4196 When two or more modals coexist on the same page, the refresh method of each modal is executed, even if one of them is being shown. By checking if the module is active or being animated, you prevent conflicts between shown and hidden modals, like the one described in the issue. --- src/definitions/modules/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 9de8673de..ea19e47f0 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -290,7 +290,7 @@ $.fn.modal = function(parameters) { } }, resize: function() { - if( $dimmable.dimmer('is active') ) { + if( $dimmable.dimmer('is active') && ( module.is.animating() || module.is.active() ) ) { requestAnimationFrame(module.refresh); } }