mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Fix hyperlink in contoll doc comment (#10690)
Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
+11
-1
@@ -22,10 +22,20 @@
|
||||
|
||||
let popup: HTMLDivElement | undefined
|
||||
|
||||
function isClickInsidePopup (target: Node): boolean {
|
||||
if (popup !== undefined && popup.contains(target)) return true
|
||||
if (!(target instanceof Element)) return false
|
||||
|
||||
if (target.closest('.tippy-box') !== null) return true
|
||||
if (target.closest('[data-block-editor-blur="true"]') !== null) return true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
function handleClick (event: MouseEvent): void {
|
||||
if (event.target instanceof Node) {
|
||||
const top = $popups.length > 0 && $popups[$popups.length - 1].id === popupId
|
||||
if (top && popup !== undefined && !popup.contains(event.target)) {
|
||||
if (top && !isClickInsidePopup(event.target)) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
dispatch('close', undefined)
|
||||
|
||||
Reference in New Issue
Block a user