Make sure focused highlight is reset when there is new selection data

This commit is contained in:
Jackson Harper
2023-07-25 15:47:04 +08:00
parent fc286533c8
commit cd2e35e02f

View File

@ -539,6 +539,10 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
}
}
useEffect(() => {
setFocusedHighlight(undefined)
}, [selectionData])
const dispatchHighlightMessage = (actionID: string) => {
if (props.isAppleAppEmbed) {
window?.webkit?.messageHandlers.highlightAction?.postMessage({