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({
987
987
}
988
988
backdrop = h ( BVTransition , { props : { noFade : this . noFade } } , [ backdrop ] )
989
989
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
+
990
998
// Assemble modal and backdrop in an outer <div>
991
999
return h (
992
1000
'div' ,
993
1001
{
994
1002
key : `modal-outer-${ this . _uid } ` ,
995
1003
style : this . modalOuterStyle ,
996
- attrs : { ...this . $attrs , id : this . safeId ( '__BV_modal_outer_' ) }
1004
+ attrs : { ...scopeAttrs , ... this . $attrs , id : this . safeId ( '__BV_modal_outer_' ) }
997
1005
} ,
998
1006
[ modal , backdrop ]
999
1007
)
You can’t perform that action at this time.
0 commit comments