diff options
author | bobzel <zzzman@gmail.com> | 2022-10-25 11:10:12 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-10-25 11:10:12 -0400 |
commit | ba73479fe6c0594ebe37eed6cf295e5adc49c8e1 (patch) | |
tree | b708266a43d1e2eb0594cf6ae5b402d0e3da9323 /src/Utils.ts | |
parent | c06e87b8128acb9ed2570536fc500a2bb670abf4 (diff) |
various tweaks: show border highlights in tree views, uniform treatment of embedding using title bar, even for free form views, choose bestAlias when dragging from files menu, text boxes honor document moves, show title for timeline annotations, fix dragoffset for stacks with buttons/description headers,
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index bf1f72774..5e0514bc6 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -728,10 +728,10 @@ export function getWordAtPoint(elem: any, x: number, y: number): string | undefi return undefined; } -export function hasDescendantTarget(x: number, y: number, target: HTMLDivElement | null) { +export function isTargetChildOf(ele: HTMLDivElement | null, target: Element | null) { let entered = false; - for (let child = document.elementFromPoint(x, y); !entered && child; child = child.parentElement) { - entered = entered || child === target; + for (let child = target; !entered && child; child = child.parentElement) { + entered = child === ele; } return entered; } |