Skip to content

Commit 62b0615

Browse files
committed
refactor(CModal): remove empty class attribute from body element
1 parent b8e02dc commit 62b0615

File tree

1 file changed

+5
-0
lines changed
  • packages/coreui-vue/src/components/modal

1 file changed

+5
-0
lines changed

packages/coreui-vue/src/components/modal/CModal.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { CBackdrop } from './../backdrop/CBackdrop'
1414

1515
const CModal = defineComponent({
1616
name: 'CModal',
17+
inheritAttrs: false,
1718
props: {
1819
/**
1920
* Align the modal in the center or top of the screen.
@@ -159,6 +160,10 @@ const CModal = defineComponent({
159160
done()
160161
})
161162
document.body.classList.remove('modal-open')
163+
if (document.body.className === '') {
164+
document.body.removeAttribute('class')
165+
}
166+
162167
el.classList.remove('show')
163168
}
164169
const handleAfterLeave = (el: RendererElement) => {

0 commit comments

Comments
 (0)