Update popover position on scroll and field resize to autocomplete/search TokenField examples
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Reproduce the autocomplete and search TokenField examples at the linked TokenField documentation pages, then inspect their useOverlayPosition usage and the proposed useUpdatePositionOnScroll entry point. Done means the popover stays attached during page scrolling and field resizing, and closes when clicking outside it or into another input.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🙋 Documentation Request
The popover doesn't remain positioned above/below the TokenField input in the autocomplete and search TokenField examples. The popover also can't easily be closed other than clicking an item in the popover menu (eg: clicking outside popover or clicking into another input does not close it).
Not sure if this is just a flawed/incomplete docs example or an actual bug.
https://react-aria.adobe.com/TokenField#search
https://react-aria.adobe.com/TokenField#autocomplete
Current Behavior
https://github.com/user-attachments/assets/b60de6cb-efb5-4484-8b29-16b9fb522b0e
Expected Behavior
https://github.com/user-attachments/assets/26f4bbf6-d59d-4be6-9930-72dc8c1ab9e2
Possible Fix
Setting shouldUpdatePosition: true in useOverlayPosition doesn't work.
This works as a temporary solution:
/**
* Calls `updatePosition` whenever any scroll container on the page scrolls while `isEnabled` is true, so an overlay stays
* attached to its trigger. Scrolling inside the overlay itself is ignored, since that doesn’t move the trigger.
*/
export function useUpdatePositionOnScroll(overlayRef: React.RefObject<Element | null>, updatePosition: () => void, isEnabled: boolean) {
useEffect(() => {
if (!isEnabled) return
function handleScroll(event: Event) {
// Scrolling the overlay’s own contents doesn’t move the trigger.
if (event.target instanceof Node && overlayRef.current?.contains(event.target)) return
updatePosition()
}
// Scroll events don’t bubble, so capture them from every scroll container.
window.addEventListener('scroll', handleScroll, { capture: true, passive: true })
return () => window.removeEventListener('scroll', handleScroll, { capture: true })
}, [isEnabled, updatePosition, overlayRef])
}
Environment
MacOS 15.7.4 (24G517), Google Chrome 154.0.8037.58 (arm64), react-aria: 3.52.1, react-aria-components 1.21.1
🧢 Your Company/Team
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 16k
- Forks
- 1.6k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 41
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de adobe/react-spectrum
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitPosiblemente ocupada @darshpatel1052 la tomó hace 1 día. Abiertowaiting on author
Dificultad 2/5 Menos de una hora Aptitud para principiantes 88/100
adobe/react-spectrum#10909 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValuePosiblemente ocupada @mrlexcoder la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adobe/react-spectrum#10900 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Separator adds a redundant role="separator" to its default <hr>Posiblemente ocupada @Janani-bn la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
adobe/react-spectrum#10894 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openPosiblemente ocupada @mangeshraut712 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
adobe/react-spectrum#10866 ·
Los mantenedores suelen responder en 1 día
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Posiblemente ocupada @mangeshraut712 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
adobe/react-spectrum#10856 ·
Los mantenedores suelen responder en 1 día
Todos los issues de adobe/react-spectrum
Issues similares
-
apps/stage-web bug env/os-linux pending triage scope/audio-output
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/opencode#61640 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
scope: data grid status: waiting for maintainer
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mui/mui-x#24090 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
ai-driven-fuzzing bug Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
ai-driven-fuzzing bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
linagora/twake-calendar-frontend#1944 ·
Los mantenedores suelen responder en 1 día