fix: People context menu show properly
This commit is contained in:
@@ -331,6 +331,8 @@ function playTrace(t: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showContextMenu(e: MouseEvent, p: any) {
|
function showContextMenu(e: MouseEvent, p: any) {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
ctxMenu.value = { show: true, x: e.clientX, y: e.clientY, person: p }
|
ctxMenu.value = { show: true, x: e.clientX, y: e.clientY, person: p }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +363,10 @@ function ctxAction(action: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeCtxMenu() { ctxMenu.value.show = false }
|
function closeCtxMenu(e?: MouseEvent) {
|
||||||
|
if (e && e.target instanceof Element && e.target.closest('.ms-ctx-menu')) return
|
||||||
|
ctxMenu.value.show = false
|
||||||
|
}
|
||||||
|
|
||||||
watch(showCandidates, (v) => { if (v) loadCandidates() })
|
watch(showCandidates, (v) => { if (v) loadCandidates() })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user