From 0fdbaaf8853b266f75777cf84295b1bfdedd8a8a Mon Sep 17 00:00:00 2001 From: Herst Date: Fri, 25 Aug 2017 14:01:34 +0200 Subject: [PATCH 01/17] Remove speculations about jQuery 3 --- docs/4.0/content/reboot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4.0/content/reboot.md b/docs/4.0/content/reboot.md index 63a576c6fc..6fa38a3819 100644 --- a/docs/4.0/content/reboot.md +++ b/docs/4.0/content/reboot.md @@ -339,7 +339,7 @@ HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.o {% callout warning %} #### jQuery incompatibility -`[hidden]` is not compatible with jQuery's `$(...).hide()` and `$(...).show()` methods. This could potentially change in jQuery 3, but we're not holding our breath. Therefore, we don't currently especially endorse `[hidden]` over other techniques for managing the `display` of elements. +`[hidden]` is not compatible with jQuery's `$(...).hide()` and `$(...).show()` methods. Therefore, we don't currently especially endorse `[hidden]` over other techniques for managing the `display` of elements. {% endcallout %} To merely toggle the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document, use [the `.invisible` class]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/visibility/) instead. From 487513ff03b3d63ad3b3fe641dae2a3882d5ded5 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Mon, 28 Aug 2017 16:21:04 +0100 Subject: [PATCH 02/17] Add failing test When the body does not overflow (achieved by hiding the QUnit container), it should not be given a margin. --- js/tests/unit/modal.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 5b265df158..3611dfdf11 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -391,6 +391,25 @@ $(function () { .bootstrapModal('show') }) + QUnit.test('should not adjust the inline body padding when it does not overflow', function (assert) { + assert.expect(1) + var done = assert.async() + var $body = $(document.body) + var originalPadding = $body.css('padding-right') + + $('#qunit-container').hide() + $('