Skip to content

Commit

Permalink
Merge pull request #2724 from SUI-Components/fix/moleculeModalState
Browse files Browse the repository at this point in the history
fix(components/molecule/modal): Do not launch multiple animations on …
  • Loading branch information
ferransimon authored Apr 25, 2024
2 parents 1744df3 + 2dae5bc commit 82bdfea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/molecule/modal/src/MoleculeModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const MoleculeModal = forwardRef(
ev => {
ev && ev.stopPropagation()
toggleWindowScroll(false)

if (!isPageScrollable) enableScrollPage()

onClose()
Expand Down Expand Up @@ -128,11 +127,11 @@ const MoleculeModal = forwardRef(
const wrapperClassName = cx(suitClass(), {
'is-static': !withAnimation,
'is-MoleculeModal-open': isOpen,
[suitClass({element: 'out'})]: isClosing
[suitClass({element: 'out'})]: isClosing && !isOpen
})

const dialogClassName = cx(suitClass({element: 'dialog'}), {
[suitClass({element: 'dialog--out'})]: isClosing,
[suitClass({element: 'dialog--out'})]: isClosing && !isOpen,
[suitClass({element: 'dialog--fit'})]: fitContent,
[suitClass({element: `dialog--size-${size}`})]: !!size,
[suitClass({element: 'dialog--visible-overflow'})]: isOverflowVisible
Expand Down

0 comments on commit 82bdfea

Please sign in to comment.