TimePicker panel will keep scrolling after select a time.
まだ誰も着手していません。
評価
- 難易度
- 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
- スター
- 304
- フォーク
- 347
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/picker のほかの issue
-
enter date manually in format YY prevent the user to add YYYY対応中かも @nrps9909 が 39 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
react-component/picker#956 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
react-component/picker#955 · コメント 1 件 · リアクション 1 件 ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolution対応中かも @DanielChutkowskiJMMJ が 321 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
react-component/picker#949 ·
-
DatePicker does not trigger onChange when manually clearing input text対応中かも @nrps9909 が 39 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
react-component/picker#946 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
react-component/picker#939 ·
react-component/picker の issue をすべて見る
似ている issue
-
area:docs bug triage:confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Cotal-AI/Cotal#2875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
anomalyco/models.dev#8862 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
fix(data-lake): wizard source step still previews the local slug, not the server-disambiguated oneオープンdata-lake
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
ready-for-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
konflux-ci/konflux-ui#1596 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue priority: low size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信