Skip to content

Commit

Permalink
Fixed #6715 - Keyboard Accessible Tree enter support?
Browse files Browse the repository at this point in the history
  • Loading branch information
Merve7 committed Oct 18, 2018
1 parent 4f9d74a commit 650e7f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ export class UITreeNode implements OnInit {

event.preventDefault();
break;

//enter
case 13:
this.tree.onNodeClick(event, this.node);

event.preventDefault();

default:
//no op
Expand Down Expand Up @@ -545,7 +551,7 @@ export class Tree implements OnInit,AfterContentInit,OnDestroy,BlockableUI {
});
}

onNodeClick(event: MouseEvent, node: TreeNode) {
onNodeClick(event, node: TreeNode) {
let eventTarget = (<Element> event.target);

if(eventTarget.className && eventTarget.className.indexOf('ui-tree-toggler') === 0) {
Expand Down

0 comments on commit 650e7f3

Please sign in to comment.