diff options
| author | Catalin Zalog <[email protected]> | 2018-03-01 10:30:47 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2018-07-11 11:05:38 +0200 |
| commit | cb82394fc8645d4e41476d19693844fac5022b4c (patch) | |
| tree | 2eb24a91875ceb1a4f2f80270ece7acb593208bd /js/src | |
| parent | abb48686267db3dadaa390e62538d23216c046d3 (diff) | |
| download | bootstrap-cb82394fc8645d4e41476d19693844fac5022b4c.tar.xz bootstrap-cb82394fc8645d4e41476d19693844fac5022b4c.zip | |
fix(modal): removes .navbar-toggler margin
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/modal.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/js/src/modal.js b/js/src/modal.js index 904f6f93c..e7f9d2d96 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -64,8 +64,7 @@ const Modal = (($) => { DATA_TOGGLE : '[data-toggle="modal"]', DATA_DISMISS : '[data-dismiss="modal"]', FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', - STICKY_CONTENT : '.sticky-top', - NAVBAR_TOGGLER : '.navbar-toggler' + STICKY_CONTENT : '.sticky-top' } /** @@ -452,15 +451,6 @@ const Modal = (($) => { .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`) }) - // Adjust navbar-toggler margin - $(navbarToggler).each((index, element) => { - const actualMargin = element.style.marginRight - const calculatedMargin = $(element).css('margin-right') - $(element) - .data('margin-right', actualMargin) - .css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`) - }) - // Adjust body padding const actualPadding = document.body.style.paddingRight const calculatedPadding = $(document.body).css('padding-right') @@ -482,8 +472,8 @@ const Modal = (($) => { } }) - // Restore sticky content and navbar-toggler margin - const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`)) + // Restore sticky content + const elements = [].slice.call(document.querySelectorAll(`${Selector.STICKY_CONTENT}`)) $(elements).each((index, element) => { const margin = $(element).data('margin-right') if (typeof margin !== 'undefined') { |
