From: Andrew Luca Date: Sun, 14 Oct 2018 19:39:40 +0000 (+0300) Subject: test: ensure .navbar-fixed-* padding on modal open X-Git-Tag: v3.4.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b78f465d39b87d24d7ddba9b20374017e902672;p=thirdparty%2Fbootstrap.git test: ensure .navbar-fixed-* padding on modal open --- diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index dc14942455..a38d0fe582 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -387,4 +387,80 @@ $(function () { }) .bootstrapModal('show') }) + + QUnit.test('should add padding-right of scrollbar width to .navbar-fixed-top and .navbar-fixed-bottom before open', function (assert) { + assert.expect(2) + var Modal = $.fn.bootstrapModal.Constructor + var done = assert.async() + var $body = $(document.body) + var scrollbarWidth + + // simulate overflow scroll + $body.css({ height: '2000px' }) + + var $fixedTop = $('