Skip to content

Commit

Permalink
Fixed #16191 | Accessibility: Tree not selectable via Keyboard after …
Browse files Browse the repository at this point in the history
…second dialog opening
  • Loading branch information
mehmetcetin01140 committed Nov 11, 2024
1 parent a65512a commit 6438500
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/primeng/src/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ export class UITreeNode extends BaseComponent implements OnInit {
ngOnInit() {
super.ngOnInit();
(<TreeNode>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(<TreeNode>this.node, <TreeNode<any>[]>this.tree.value, 'parent', this.tree.getNodeWithKey(<string>this.parentNode.key, <TreeNode<any>[]>this.tree.value));
}
Expand Down

0 comments on commit 6438500

Please sign in to comment.