Skip to content

Commit

Permalink
fix: prevent selection when drag fExternalItem
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheihuzarevich committed Aug 12, 2024
1 parent 1149be1 commit 036e192
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ export class FExternalItemDirective<TData> extends FExternalItemBase<TData> impl

public ngOnInit(): void {
this.fExternalItemService.registerItem(this);
this.disablePointerEvents(Array.from(this.hostElement.children) as HTMLElement[]);
}

private disablePointerEvents(children: HTMLElement[]): void {
children.forEach((x) => {
x.style.pointerEvents = 'none';
this.disablePointerEvents(Array.from(x.children) as HTMLElement[]);
});
}

public ngOnDestroy(): void {
Expand Down

0 comments on commit 036e192

Please sign in to comment.