Skip to content

Commit

Permalink
Merge pull request #16192 from primefaces/issue-16191
Browse files Browse the repository at this point in the history
Fixed #16191 - Accessibility: Tree not selectable via Keyboard after …
  • Loading branch information
cetincakiroglu committed Aug 8, 2024
2 parents 5e148b8 + f54c8f0 commit fd850f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,10 @@ export class UITreeNode implements OnInit {

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 fd850f8

Please sign in to comment.