js-kompo-utils 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,6 +49,7 @@ export default {
|
|
|
49
49
|
menuTop: -9999,
|
|
50
50
|
menuLeft: -9999,
|
|
51
51
|
menuRight: null,
|
|
52
|
+
inModal: false,
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
watch:{
|
|
@@ -88,7 +89,7 @@ export default {
|
|
|
88
89
|
position: 'fixed',
|
|
89
90
|
top: this.menuTop + 'px',
|
|
90
91
|
bottom: 'auto',
|
|
91
|
-
zIndex: 900,
|
|
92
|
+
zIndex: this.inModal ? 5001 : 900,
|
|
92
93
|
transition: 'transform 0.2s ease-in-out, opacity 0.2s ease-in-out',
|
|
93
94
|
transformOrigin: (this.isUpward ? 'bottom' : 'top') + ' ' + (this.isRightAligned ? 'right' : 'left'),
|
|
94
95
|
}
|
|
@@ -154,6 +155,8 @@ export default {
|
|
|
154
155
|
const root = this.$refs.dropdownRoot
|
|
155
156
|
if (!menu) return
|
|
156
157
|
|
|
158
|
+
this.inModal = !!(root && root.closest('.kompoModal'))
|
|
159
|
+
|
|
157
160
|
// Transfer scroll styles from root before teleporting
|
|
158
161
|
if (root && root.classList.contains('dropdown-with-scroll')) {
|
|
159
162
|
const maxHeight = getComputedStyle(root).getPropertyValue('--dropdown-max-height').trim()
|