File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -987,13 +987,21 @@ export const BModal = /*#__PURE__*/ Vue.extend({
987987 }
988988 backdrop = h ( BVTransition , { props : { noFade : this . noFade } } , [ backdrop ] )
989989
990+ // If the parent has a scoped style attribute, and the modal
991+ // is portalled, add the scoped attribute to the modal wrapper
992+ const $parent = this . $parent
993+ const scopeAttrs =
994+ ! this . static && $parent && $parent . $options . _scopeId
995+ ? { [ `${ [ $parent . $options . _scopeId ] } ` ] : '' }
996+ : { }
997+
990998 // Assemble modal and backdrop in an outer <div>
991999 return h (
9921000 'div' ,
9931001 {
9941002 key : `modal-outer-${ this . _uid } ` ,
9951003 style : this . modalOuterStyle ,
996- attrs : { ...this . $attrs , id : this . safeId ( '__BV_modal_outer_' ) }
1004+ attrs : { ...scopeAttrs , ... this . $attrs , id : this . safeId ( '__BV_modal_outer_' ) }
9971005 } ,
9981006 [ modal , backdrop ]
9991007 )
You can’t perform that action at this time.
0 commit comments