From 2f4ddb8ed91c5bb53b9d91a7a39cb15a1c3c6962 Mon Sep 17 00:00:00 2001 From: lucascono Date: Sun, 6 Aug 2017 22:59:14 -0300 Subject: [PATCH 1/4] Fix the min breakpoint in media-breakpoint-between --- scss/mixins/_breakpoints.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/mixins/_breakpoints.scss b/scss/mixins/_breakpoints.scss index 9a374fee65..8d7378d360 100644 --- a/scss/mixins/_breakpoints.scss +++ b/scss/mixins/_breakpoints.scss @@ -78,7 +78,7 @@ // Media that spans multiple breakpoint widths. // Makes the @content apply between the min and max breakpoints @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) { - $min: breakpoint-max($lower, $breakpoints); + $min: breakpoint-min($lower, $breakpoints); $max: breakpoint-max($upper, $breakpoints); @media (min-width: $min) and (max-width: $max) { From 4b6537bef36c7eddd3c3ddbd35dabafbbfbb03de Mon Sep 17 00:00:00 2001 From: lucascono Date: Wed, 4 Oct 2017 06:08:34 -0300 Subject: [PATCH 2/4] Fix modal bug Fix for issue #24117 --- js/src/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/modal.js b/js/src/modal.js index fb787208d8..1ea630c415 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -113,7 +113,7 @@ const Modal = (() => { } show(relatedTarget) { - if (this._isTransitioning) { + if (this._isTransitioning || this._isShown) { return } From 47968c8126027c079e9a54c71a63b5dfaf3c0bda Mon Sep 17 00:00:00 2001 From: lucascono Date: Wed, 4 Oct 2017 08:55:40 -0300 Subject: [PATCH 3/4] Unit test for modal bug fix Unit test for pull request #24240 --- js/tests/unit/modal.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index e026cd7f14..d55a552ade 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -673,4 +673,17 @@ $(function () { $toggleBtn.trigger('click') setTimeout(done, 500) }) + + QUnit.test('should not try to open a modal which is already visible', function (assert) { + assert.expect(1) + var done = assert.async() + var count = 0 + + $('