fix: tag context menu button opening notes list veiw (#1390)
This commit is contained in:
@@ -183,7 +183,11 @@ export const TagsListItem: FunctionComponent<Props> = observer(
|
|||||||
|
|
||||||
const readyToDrop = isOver && canDrop
|
const readyToDrop = isOver && canDrop
|
||||||
|
|
||||||
const toggleContextMenu = useCallback(() => {
|
const toggleContextMenu: MouseEventHandler<HTMLAnchorElement> = useCallback(
|
||||||
|
(event) => {
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
|
||||||
if (!menuButtonRef.current) {
|
if (!menuButtonRef.current) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -196,7 +200,9 @@ export const TagsListItem: FunctionComponent<Props> = observer(
|
|||||||
} else {
|
} else {
|
||||||
onContextMenu(tag, menuButtonRect.right, menuButtonRect.top)
|
onContextMenu(tag, menuButtonRect.right, menuButtonRect.top)
|
||||||
}
|
}
|
||||||
}, [onContextMenu, tagsState, tag])
|
},
|
||||||
|
[onContextMenu, tagsState, tag],
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user