primereact
primereact copied to clipboard
TiredMenu: Keyboard navigation breaks when using templates
Describe the bug
Without a template you are able to use the keyboard to navigate to and trigger the command on a menu item by pressing enter. When using a template, keyboard selection works as expected to select an item but hitting enter does not trigger the command anymore.
Reproducer
https://stackblitz.com/edit/l7ugbc?file=src%2FApp.jsx
System Information
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
primereact: latest => 10.8.3
react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
See the example, the 'New' option has been given a template, and the command no longer works when you use the keyboard.
Everything else in the Menu seems to work fine.
Expected behavior
I would expect for it to work the same regardless of if an item has a template or not.