diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index be53fb4c1b9..f8652632f7f 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -281,7 +281,10 @@ export class UITreeNode implements OnInit { 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)); }