🐛 (editor) Fix single block duplication
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
} from '@chakra-ui/react'
|
||||
|
||||
export interface ContextMenuProps<T extends HTMLElement> {
|
||||
onOpen?: () => void
|
||||
renderMenu: () => JSX.Element | null
|
||||
children: (
|
||||
ref: MutableRefObject<T | null>,
|
||||
@@ -61,6 +62,7 @@ export function ContextMenu<T extends HTMLElement = HTMLElement>(
|
||||
if (e.currentTarget === targetRef.current) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
props.onOpen?.()
|
||||
setIsOpened(true)
|
||||
setPosition([e.pageX, e.pageY])
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user