Skip to content

Commit b1dac67

Browse files
authored
Update config.js
1 parent 1f90fa4 commit b1dac67

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

src/utils/config.js

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,24 +78,10 @@ const DEFAULTS = {
7878
BModal: {
7979
// Defaults to the Boostrap default of the modal backdrop
8080
zIndexOffset: 1040,
81-
// The following needs to be higher than the largest z-index element
82-
// inside the modal (such has popovers and tooltips).
83-
// The modal's stacking div z-index will be set to:
84-
// zIndexOffset + ((NumModalsOpened - 1) * zIndexIncrement)
85-
// In default bootstrao the z-indexes are as follows:
86-
// - modal-backdrop 1040,
87-
// - modal 1050
88-
// - popover 1060
89-
// - tooltip 1070
90-
// and intermdiat elements inside those components will add 1 to 5 to their z-index.
91-
// https://getbootstrap.com/docs/4.3/layout/overview/#z-index
92-
//
93-
// This accouts for aproximately 35 z-index change between the backdrop and highest
94-
// z-index value in a modal construct. So we use an increment value of 40 as a buffer
95-
// between stacked modals. If modals are always guaranteed to be in the document in
96-
// the order that they will be opened, then this increment value could be reduced to
97-
// a value of 5 or even 0
98-
zIndexIncrement: 40,
81+
// Since each modal wrapper creates a new stacking context, we jsut need to
82+
// make sure the next stacked modal has a slighly higher z-index.
83+
// in most cases 1 should suffice.
84+
zIndexIncrement: 1,
9985
// Props defaults
10086
cancelTitle: 'Cancel',
10187
cancelVariant: 'secondary',

0 commit comments

Comments
 (0)