From b010a6f9f4ea3dda08a4792e1367730ddcf8752d Mon Sep 17 00:00:00 2001 From: alpadev <2838324+alpadev@users.noreply.github.com> Date: Sun, 25 Jul 2021 19:36:11 +0200 Subject: fix(modal): change the order we return from show() method (#34087) In case of a modal with fading enabled, a prevented show event can cause show to not showing the modal anymore. See #34055 Co-authored-by: XhmikosR --- js/tests/unit/modal.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'js/tests') diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index a46b3d2de..f2c60684b 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -102,6 +102,32 @@ $(function () { .bootstrapModal('show') }) + QUnit.test('should be shown after the first call to show() has been prevented while fading is enabled', function (assert) { + assert.expect(2) + var done = assert.async() + + var $el = $('