fix: DirectoryTree keyboard error (#32551)
fix: DirectoryTree keyboard error (#32551)

* Fix bug in keyboard navigation

When selecting a node using the keyboard (spacebar), the event received by onSelect has an undefined MouseEvent. Keyboard navigation was not possible because an error was thrown when trying to access properties from the undefined nativeEvent. We are now testing if nativeEvent is defined before accessing its properties.

* fix: DirectoryTree throws error during keyboard navigation
elevensky/ant-design,elevensky/ant-design,icaife/ant-design,zheeeng/ant-design,ant-design/ant-design,ant-design/ant-design,zheeeng/ant-design,elevensky/ant-design,ant-design/ant-design,zheeeng/ant-design,icaife/ant-design,ant-design/ant-design,icaife/ant-design,icaife/ant-design,elevensky/ant-design,zheeeng/ant-design