File tree 1 file changed +4
-0
lines changed
packages/coreui-vue/src/components/modal
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,8 @@ const CModal = defineComponent({
145
145
const handleEnter = ( el : RendererElement , done : ( ) => void ) => {
146
146
executeAfterTransition ( ( ) => done ( ) , el as HTMLElement )
147
147
document . body . classList . add ( 'modal-open' )
148
+ document . body . style . overflow = 'hidden'
149
+ document . body . style . paddingRight = '0px'
148
150
el . style . display = 'block'
149
151
setTimeout ( ( ) => {
150
152
el . classList . add ( 'show' )
@@ -160,6 +162,8 @@ const CModal = defineComponent({
160
162
const handleLeave = ( el : RendererElement , done : ( ) => void ) => {
161
163
executeAfterTransition ( ( ) => done ( ) , el as HTMLElement )
162
164
document . body . classList . remove ( 'modal-open' )
165
+ document . body . style . removeProperty ( 'overflow' )
166
+ document . body . style . removeProperty ( 'padding-right' )
163
167
if ( document . body . className === '' ) {
164
168
document . body . removeAttribute ( 'class' )
165
169
}
You can’t perform that action at this time.
0 commit comments