Blank select listbox when re-opening in Firefox.
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- react, typescript
- Domínio
- frontend, performance
Direção de pesquisa
Comece com o exemplo reproduzível em src/App.tsx e execute o exemplo virtualizado de Select no Firefox. Reproduza a falha rolando além do valor de overscan, fechando o listbox e reabrindo-o; em seguida, compare o comportamento com o Chrome. Considera-se concluído quando as opções estiverem visíveis imediatamente ao reabrir, sem exigir rolagem.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
If we reopen our Select listbox after scrolling down past the overscan value, the listbox has no options rendered. They appear in the DOM but not in the listbox. If you scroll even by 1px once reopened, the options render (I have attached a screen recording of this further down).
Your minimal, reproducible example
https://stackblitz.com/edit/parsium-carbon-starter-zza8bg?file=src%2FApp.tsx
Steps to reproduce
-
Open Firefox and navigate to our Select virtualised example or the reproducible Stackblitz example
-
Click the Select's component textbox to open it and scroll down beyond option 30 (the
overscanvalue is 20, so a whole new list of options is rendered there) -
Close the listbox. This can be done by clicking away from the listbox.
-
Click the Select's component textbox to reopen Select's listbox.
Actual Result:
Listbox is initially blank.
Expected Result:
Options to be visible.
Expected behavior
I expect there to be options in the listbox.
How often does this bug happen?
Every time
Screenshots or Videos
Firefox:
https://github.com/user-attachments/assets/6c2022b4-d56e-4bb0-925a-fbcfeb211839
Chrome:
https://github.com/user-attachments/assets/ed5d48c0-289c-42af-a84a-cc96de273fcb
Firefox but I scroll a small amount when reopening:
https://github.com/user-attachments/assets/6d7ba0f6-6540-4ac7-bb2a-3cc1ce763759
Platform
Operating Systems:
- MacOS
- Windows
Web Browser:
- Firefox (I am using v133.0)
tanstack-virtual version
v3.10.1
TypeScript version
v4.7.0
Additional context
I was able to fix this bug using the code below. However, I was not prepared to merge it into our codebase as I don't think browser sniffing is a particularly good fix for this. Without the conditional check for Firefox, this would break our implementation on Chrome, Safari and Edge.
This is what seemed to fix it:
const SCROLL_OPTIONS: ScrollToOptions = { behavior: "auto", align: "end" };
const browserIsFirefox =
navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
useEffect(() => {
if (browserIsFirefox && isOpen && currentOptionsListIndex === -1) {
virtualizer.scrollBy(0, SCROLL_OPTIONS);
}
});
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Linguagem predominante
- TypeScript
- Estrelas
- 7.1k
- Forks
- 478
- Merge médio
- 1d 3h
- PRs com merge (30d)
- 31
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
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 TanStack/virtual
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
Mantenedores costumam responder em até 1 dia
-
anchorTo: 'end' loses the end when the scroll element shrinksTalvez já em andamento @langleyd assumiu há 10 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)Talvez já em andamento @prayaggaikwad96 assumiu há 3 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
TanStack/virtual#1252 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
lit-virtual: VirtualizerController never applies updated options after constructionTalvez já em andamento @waterWang assumiu há 66 dias. Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 45/100
Mantenedores costumam responder em até 1 dia
Todas as issues de TanStack/virtual
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
anomalyco/opencode#56380 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
BUG | `MCP 服务器` | 全局层行的停用/启用与删除报 404 server row not found,编辑保存会在 profile 层复制出重复行Talvez já em andamento @w6242652 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Chocobozzz/PeerTube#7832 ·
Mantenedores costumam responder em até 3 dias
-
Pay to use?Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 66/100
darkreader/darkreader#16108 · 1 comentário ·
Mantenedores costumam responder em até 2 dias