callstack / callstack/react-native-paper

Opening a Menu from a TextInput anchor on the web unfocuses the anchor

Abierto
#2,903 10 comentarios 1 reacción 0 asignados Ver en GitHub
Hacktoberfest repro provided
Lenguaje dominante
TypeScript
Estrellas
14.5k
Forks
2.2k
Merge medio
5 d 23 h
PR fusionados (30 d)
12

Descripción

### Current behaviour
When a Menu has a TextInput as an anchor, if that input's onFocus is used to open the menu, it becomes unfocused.

### Expected behaviour
This is not consistent with Android, where it keeps focus. It would be nice if it worked this way on the web too, so that a searchable dropdown can be implemented.

### Code sample
https://snack.expo.dev/@pta2002/eb79e2

### What have you tried
I have tried using a separate component (not the anchor) to trigger the menu, but it got unfocused as well. Either way, I think the behaviour should at least be consistent.

### Your Environment

| software | version
| --------------------- | -------
| ios or android | Android 11
| react-native | 0.63.2
| react-native-paper | 4.9.2
| node | 14.17.6
| npm or yarn | npm 6.14.15
| expo sdk | 42.0.1

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the linked Expo Snack and reproduce the focus loss when a Menu is opened from a TextInput on the web. Then trace the Menu anchor and focus behavior, compare it with Android, and verify that a searchable dropdown keeps the TextInput focused on the web.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
react-native, typescript
Área
frontend, mobile
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.