diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index dc1494245..a38d0fe58 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 = $('