Skip to content

Commit

Permalink
fix(components): add stopPropagation to zoom buttons
Browse files Browse the repository at this point in the history
Ticket: issue/MainLibrary-153
Reviewed-by: @MIGUELez11
Refs: #148
  • Loading branch information
fermarinsanchez authored Apr 26, 2024
1 parent e32759a commit bb49cee
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/components/src/overlay/ModalZoom/ModalZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const ModalZoom = ({ children, canPlay, opened, hideButton, onClose = noop, styl
center.current?.call();
}
}, [opened]);

return (
<>
{!hideButton && (
Expand Down Expand Up @@ -58,10 +57,20 @@ const ModalZoom = ({ children, canPlay, opened, hideButton, onClose = noop, styl
return (
<React.Fragment>
<Box className={classes.tools}>
<Box onClick={() => zoomIn()}>
<Box
onClick={(e) => {
e.stopPropagation();
zoomIn();
}}
>
<ZoomInIcon />
</Box>
<Box onClick={() => zoomOut()}>
<Box
onClick={(e) => {
e.stopPropagation();
zoomOut();
}}
>
<ZoomOutIcon />
</Box>
</Box>
Expand Down

0 comments on commit bb49cee

Please sign in to comment.