Skip to content

Commit

Permalink
fix(composer): click events for tag and overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
sheilaXu committed May 18, 2023
1 parent 89c322a commit 2bf7b13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ export function AsyncLoadedAnchorWidget({
],
});
}

event.stopPropagation();
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const DataOverlayContainer = ({ component, node }: DataOverlayContainerPr
}, [componentVisible]);

// Same behavior as other components to select node when clicked on the panel
const onPointerUp = useCallback(
const onClickContainer = useCallback(
(e) => {
e.stopPropagation();
if (selectedSceneNodeRef !== node.ref) {
Expand All @@ -77,13 +77,12 @@ export const DataOverlayContainer = ({ component, node }: DataOverlayContainerPr
<>
<div
ref={containerRef}
onPointerUp={onPointerUp}
onPointerDown={(e) => e.stopPropagation()}
onClick={onClickContainer}
style={{ ...tmContainer, ...(isAnnotation ? tmAnnotationContainer : tmPanelContainer) }}
>
{!isAnnotation && !componentVisible && (
<div style={tmCloseButtonDiv}>
<button style={tmCloseButton} onPointerUp={onClickCloseButton}>
<button style={tmCloseButton} onClick={onClickCloseButton}>
X
</button>
</div>
Expand Down

0 comments on commit 2bf7b13

Please sign in to comment.