From f54c8f0005f3b865645ea9aa7161e54e7add5097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:37:02 +0300 Subject: [PATCH] Fixed #16191 - Accessibility: Tree not selectable via Keyboard after second dialog opening --- src/app/components/tree/tree.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)); }