@@ -29,11 +29,9 @@ import { toFloat, toInteger } from '../../../utils/number'
29
29
const DEFAULT_ZINDEX = 1040
30
30
31
31
// Selectors for padding/margin adjustments
32
- const Selector = {
33
- FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top' ,
34
- STICKY_CONTENT : '.sticky-top' ,
35
- NAVBAR_TOGGLER : '.navbar-toggler'
36
- }
32
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
33
+ const SELECTOR_STICKY_CONTENT = '.sticky-top'
34
+ const SELECTOR_NAVBAR_TOGGLER = '.navbar-toggler'
37
35
38
36
// --- Main component ---
39
37
@@ -161,23 +159,23 @@ const ModalManager = /*#__PURE__*/ Vue.extend({
161
159
const scrollbarWidth = this . scrollbarWidth
162
160
// Adjust fixed content padding
163
161
/* istanbul ignore next: difficult to test in JSDOM */
164
- selectAll ( Selector . FIXED_CONTENT ) . forEach ( el => {
162
+ selectAll ( SELECTOR_FIXED_CONTENT ) . forEach ( el => {
165
163
const actualPadding = getStyle ( el , 'paddingRight' ) || ''
166
164
setAttr ( el , 'data-padding-right' , actualPadding )
167
165
setStyle ( el , 'paddingRight' , `${ toFloat ( getCS ( el ) . paddingRight , 0 ) + scrollbarWidth } px` )
168
166
body . _paddingChangedForModal . push ( el )
169
167
} )
170
168
// Adjust sticky content margin
171
169
/* istanbul ignore next: difficult to test in JSDOM */
172
- selectAll ( Selector . STICKY_CONTENT ) . forEach ( el => /* istanbul ignore next */ {
170
+ selectAll ( SELECTOR_STICKY_CONTENT ) . forEach ( el => /* istanbul ignore next */ {
173
171
const actualMargin = getStyle ( el , 'marginRight' ) || ''
174
172
setAttr ( el , 'data-margin-right' , actualMargin )
175
173
setStyle ( el , 'marginRight' , `${ toFloat ( getCS ( el ) . marginRight , 0 ) - scrollbarWidth } px` )
176
174
body . _marginChangedForModal . push ( el )
177
175
} )
178
176
// Adjust <b-navbar-toggler> margin
179
177
/* istanbul ignore next: difficult to test in JSDOM */
180
- selectAll ( Selector . NAVBAR_TOGGLER ) . forEach ( el => /* istanbul ignore next */ {
178
+ selectAll ( SELECTOR_NAVBAR_TOGGLER ) . forEach ( el => /* istanbul ignore next */ {
181
179
const actualMargin = getStyle ( el , 'marginRight' ) || ''
182
180
setAttr ( el , 'data-margin-right' , actualMargin )
183
181
setStyle ( el , 'marginRight' , `${ toFloat ( getCS ( el ) . marginRight , 0 ) + scrollbarWidth } px` )
0 commit comments