diff options
author | Catalin Zalog <c@zalog.ro> | 2018-03-01 11:30:47 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2018-07-11 12:05:38 +0300 |
commit | cb82394fc8645d4e41476d19693844fac5022b4c (patch) | |
tree | 2eb24a91875ceb1a4f2f80270ece7acb593208bd /js/src/modal.js | |
parent | abb48686267db3dadaa390e62538d23216c046d3 (diff) |
fix(modal): removes .navbar-toggler margin
Diffstat (limited to 'js/src/modal.js')
-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 904f6f93ce..e7f9d2d960 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') { |