react-component / menu

React Menu
https://menu.react-component.now.sh/
MIT License
679 stars 244 forks source link

fix: fix focus #679

Closed yoyo837 closed 7 months ago

yoyo837 commented 7 months ago

ref: https://github.com/react-component/menu/pull/671

codecov[bot] commented 7 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (67baccb) 99.58% compared to head (4f140f8) 99.30%.

Files Patch % Lines
src/Menu.tsx 66.66% 1 Missing :warning:
src/hooks/useAccessibility.ts 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #679 +/- ## ========================================== - Coverage 99.58% 99.30% -0.28% ========================================== Files 27 27 Lines 718 722 +4 Branches 193 194 +1 ========================================== + Hits 715 717 +2 - Misses 3 5 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yoyo837 commented 7 months ago

我调试发现在 antd 的 test case 中,用例失败是因为 focus 的时候 li 没有宽高,认为 unfocusable 然后 filter 掉了 , 而 rc-menu 的用例始终成功是用例运行时,li 有宽高,是 focusable

image