fix(whiteboard): an issue on clicking logseq search items

This commit is contained in:
Peng Xiao
2022-10-07 18:47:30 +08:00
parent 9608910055
commit 2ade3d326d

View File

@@ -640,9 +640,9 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
setPrefixIcon(actionIcon)
setFocusedOptionIdx(index)
}}
// we have to use mousedown && stop propagation, otherwise some
// we have to use mousedown && stop propagation EARLY, otherwise some
// default behavior of clicking the rendered elements will happen
onMouseDown={e => {
onMouseDownCapture={e => {
if (onChosen()) {
e.stopPropagation()
e.preventDefault()