File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/coreui-vue/src/components/modal Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,8 @@ const CModal = defineComponent({
145145 const handleEnter = ( el : RendererElement , done : ( ) => void ) => {
146146 executeAfterTransition ( ( ) => done ( ) , el as HTMLElement )
147147 document . body . classList . add ( 'modal-open' )
148+ document . body . style . overflow = 'hidden'
149+ document . body . style . paddingRight = '0px'
148150 el . style . display = 'block'
149151 setTimeout ( ( ) => {
150152 el . classList . add ( 'show' )
@@ -160,6 +162,8 @@ const CModal = defineComponent({
160162 const handleLeave = ( el : RendererElement , done : ( ) => void ) => {
161163 executeAfterTransition ( ( ) => done ( ) , el as HTMLElement )
162164 document . body . classList . remove ( 'modal-open' )
165+ document . body . style . removeProperty ( 'overflow' )
166+ document . body . style . removeProperty ( 'padding-right' )
163167 if ( document . body . className === '' ) {
164168 document . body . removeAttribute ( 'class' )
165169 }
You can’t perform that action at this time.
0 commit comments