Invalid Example for Mouse and pointer events Documentation
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 11.8k
- 分支
- 7.9k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 11
描述
Hi, I think here is Invalid example for this documentation
https://reactjs.org/docs/accessibility.html#mouse-and-pointer-events
In this documentation, there is a code not to close the pop-over when focusing on the child.
// If a child receives focus, do not close the popover.
onFocusHandler() {
clearTimeout(this.timeOutId);
}
but, when i click child element, child element doesn't receive focus
so when i click child element, the pop-over closes.
I think it's because of onFocus event does not bubble.
https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
This example is likely to cause confusion. How about modify the example to make it work?
If I'm mistaken, I think This issue may well be closed.
thanks
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從連結的無障礙文件中的 Mouse and pointer events 部分開始,並使用提供的 CodePen 重現該行為。閱讀連結的 MDN focus-event 參考文件,以驗證事件行為。範例已修正且文件所述的互動能正常運作,或者如果回報的行為有誤則關閉 issue,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- accessibility, documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100