TimePicker panel will keep scrolling after select a time.
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- react, typescript
- Domínio
- frontend
Direção de pesquisa
Comece em useScrollTo.ts e inspecione a condição de término da distância de rolagem descrita na issue. Reproduza o comportamento de TimePicker em um navegador mais antigo, como o Chrome 89, e verifique em seguida se selecionar um horário interrompe a rolagem quando a distância deixa de mudar e se a rolagem com a roda do mouse é acionada normalmente depois disso.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 304
- Forks
- 349
- Merge médio
- 43min
- PRs com merge (30d)
- 1
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de react-component/picker
-
Disabled date entered manually is not reverted on blurTalvez já em andamento @Ye-YiChen assumiu há 9 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
react-component/picker#1018 · 2 comentários ·
-
enter date manually in format YY prevent the user to add YYYYTalvez já em andamento @nrps9909 assumiu há 55 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
react-component/picker#956 · 1 comentário · 1 reação ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
react-component/picker#955 · 1 comentário · 1 reação ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolutionTalvez já em andamento @DanielChutkowskiJMMJ assumiu há 337 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 58/100
react-component/picker#949 ·
-
DatePicker does not trigger onChange when manually clearing input textTalvez já em andamento @nrps9909 assumiu há 55 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
react-component/picker#946 ·
Todas as issues de react-component/picker
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
zts212653/clowder-ai#1678 ·
Mantenedores costumam responder em até 1 dia
-
good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Progressive-Victory/the-website#680 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100