Skip to content

Commit

Permalink
fix(ComposedModal): port mousedown changes from pr carbon-design-syst…
Browse files Browse the repository at this point in the history
…em#3014 (carbon-design-system#13140)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and remolueoend committed Feb 17, 2023
1 parent c3657b8 commit fbad67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/ComposedModal/ComposedModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const ComposedModal = React.forwardRef(function ComposedModal(
onKeyDown(evt);
}

function handleClick(evt) {
function handleMousedown(evt) {
if (
!innerModal.current.contains(evt.target) &&
preventCloseOnClickOutside
Expand Down Expand Up @@ -239,7 +239,7 @@ const ComposedModal = React.forwardRef(function ComposedModal(
ref={ref}
aria-hidden={!open}
onBlur={handleBlur}
onClick={handleClick}
onMouseDown={handleMousedown}
onKeyDown={handleKeyDown}
className={modalClass}
tabIndex="-1">
Expand Down

0 comments on commit fbad67b

Please sign in to comment.