Tree | onKeydown is broken with contextMenu #13558
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When binding the
ContextMenu
component to theTree
component by passing theContextMenu
's template variable into theTree
'scontextMenu
property as described in the docs, and then trying to move around the focus on the tree items with arrows up/down, I get the error Cannot read properties of undefined (reading 'nativeElement').Here is a link to the line of code where the crash happens.
Environment
I was able to reproduce the error on PrimeNg's documentation page
Reproducer
No response
Angular version
16.2.0
PrimeNG version
16.2.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.10.0
Browser(s)
Chrome 116.0.5845.111
Steps to reproduce the behavior
Tree
withContextMenu
, click on one of the tree items to make them focused. Make sure you click on theTreeItem
, and not on the expand icon.Expected behavior
The tree item's focus should move around on the
Tree
component from tree item to tree item when using the up/down arrow keys.The text was updated successfully, but these errors were encountered: