TimePicker panel will keep scrolling after select a time.
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- react, typescript
- 領域
- frontend
研究方向
從 useScrollTo.ts 開始,檢查 issue 中描述的捲動距離終止條件。在 Chrome 89 等較舊的瀏覽器中重現 TimePicker 的行為,然後驗證選取時間時,在距離不再變化後捲動會停止,並且之後滑鼠滾輪捲動會正常觸發。
由索引模型根據 Issue 內容生成。
描述
i found the code below in useScrollTo.ts seemed to be buggy. After selecting a time from the time panel, the panel ul will scroll to the target li position. But when the target li is reaching top, the scrolling is not stopped, causing the scroll event could not be triggered on mouse-wheel scrolling.
// Break if dist get larger, which means user is scrolling
if (scrollDistRef.current !== null && scrollDistRef.current < dist) {
stopScroll();
return;
}
scrollDistRef.current = dist;
When the scenario above happens, the scrollDistRef.current is always equal to dist. So the stopScroll will be never called.
As I observed, the issue only happened on older browser like Chrome 89 in my case and did not occur on latest Chrome. In the latest Chrome, the scroll event can be fired even if the scrolling is not stopped.
I tried to changed the termimal condition as below, the scrolling is stopped and can be scrolled manually again:
if (scrollDistRef.current !== null && (scrollDistRef.current < dist || Math.abs(scrollDistRef.current - dist) < Number.EPSILON)) {
stopScroll();
return;
}
That is, to stop scrolling when scrollDistRef and dist is equal (dist does not change anymore).
Not sure if anyone got the same issue.
The antd version is 5.15.1
- 主要語言
- TypeScript
- 星號
- 305
- 分支
- 349
- 平均合併
- 43 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react-component/picker 的其他 Issue
-
Disabled date entered manually is not reverted on blur可能已有人在做 @Ye-YiChen 於 24 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 68/100
react-component/picker#1018 · 2 則留言 ·
-
enter date manually in format YY prevent the user to add YYYY可能已有人在做 @nrps9909 於 70 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 48/100
react-component/picker#956 · 1 則留言 · 1 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 30/100
react-component/picker#955 · 1 則留言 · 1 個 reaction ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolution可能已有人在做 @DanielChutkowskiJMMJ 於 352 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 58/100
react-component/picker#949 ·
-
DatePicker does not trigger onChange when manually clearing input text可能已有人在做 @nrps9909 於 70 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 55/100
react-component/picker#946 ·
查看 react-component/picker 的全部 Issue
相似的 Issue
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is picked未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
維護者通常 2 天內回覆
-
desktop linux photos
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
Cleanup Setup可能已有人在做 @AlexanderKaran 今天認領。 未關閉documentation enhancement
難度 2/5 1-3 小時 新手友好度 64/100
e18e/framework-tracker#769 ·
維護者通常 1 天內回覆
-
bug v2
難度 1/5 1 小時以內 新手友好度 88/100
modelcontextprotocol/servers#5483 ·
維護者通常 1 天內回覆