diff --git a/packages/primeng/src/tree/tree.ts b/packages/primeng/src/tree/tree.ts index 2948576888d..47b85423263 100755 --- a/packages/primeng/src/tree/tree.ts +++ b/packages/primeng/src/tree/tree.ts @@ -231,7 +231,9 @@ export class UITreeNode extends BaseComponent implements OnInit { ngOnInit() { super.ngOnInit(); (this.node).parent = this.parentNode; - if (this.parentNode) { + const nativeElement = this.tree.el.nativeElement; + const pDialogWrapper = nativeElement.closest('p-dialog'); + if (this.parentNode && !pDialogWrapper) { this.setAllNodesTabIndexes(); this.tree.syncNodeOption(this.node, []>this.tree.value, 'parent', this.tree.getNodeWithKey(this.parentNode.key, []>this.tree.value)); }