`@effect/ui-native` (Effect-TS/ui): `internal/focus.ts` `trackKeyboard` ignores `keyboardWillChangeFrame` / `keyboardDidChangeFrame` dismissal
Los mantenedores suelen responder en 1 día
@effect-bot ya está trabajando en esto.
Desde el 29/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
partially generated with help of my ai friend - neon 4.4
Hi effect team,
I was trying out this package and wanted to report some bugs encountered while porting a library to effect native
What version of Effect is running?
effect:4.1.7@effect/ui&@effect/ui-native:Effect-TS/uimainat77391ee50ae3d3175d670facbf675e9a819ba6a6react-native:0.88.1
What steps can reproduce the bug?
- Clone the minimal reproduction repository:
git clone https://github.com/cliffordfajardo/effectui-native-error-reproductions.git cd effectui-native-error-reproductions pnpm install pnpm vitest run 09-focus-keyboard-misses-frame-change-dismiss - Mount a
scrollcontainer (defaultkeyboardShouldPersistTaps: "never") containing aninputand a pressable button. - Focus the
input(topFocus), emitkeyboardDidShow(height: 336), then dismiss the keyboard interactively on iOS viakeyboardDidChangeFramewith an off-screen / zero-heightendCoordinates(screenY: 852, height: 0), and tap the button inside thescrollcontainer (see09-focus-keyboard-misses-frame-change-dismiss/repro.test.ts).
What is the expected behavior?
When iOS dismisses or moves the keyboard off-screen via keyboardWillChangeFrame / keyboardDidChangeFrame, focus.keyboard should clear to undefined (matching kit/Keyboard.ts), so tapping a button inside the ScrollView fires press normally.
What do you see instead?
focus.keyboard remains stuck at 336, so internal/touch.ts:223-244 (persist()) still believes the soft keyboard is covering the app and swallows the button tap (0 presses fired).
In packages/ui-native/src/internal/focus.ts:36-48:
for (
const event of [
"keyboardWillShow",
"keyboardDidShow",
"keyboardWillHide",
"keyboardDidHide"
]
) {
const shown = event.endsWith("Show")
observe(device, "KeyboardObserver", event, (e) => {
focus.keyboard = shown ? e?.endCoordinates?.height ?? 0 : undefined
})
}
Additional information
packages/ui-native/src/kit/Keyboard.ts:88-116 already documents and handles this exact iOS behavior:
// iOS reports a keyboard dismissed interactively, or moved off the screen,
// as a frame change rather than a hide.
const offScreen = (d: Native.Device, frame: any) => {
const screen = dimensions(d).get().screen.height
return frame == null || frame.height <= 0 ||
(screen > 0 && frame.screenY >= screen)
}
Subscribing trackKeyboard in internal/focus.ts to keyboardWillChangeFrame and keyboardDidChangeFrame with the same offScreen check will keep focus.keyboard consistent with kit/Keyboard.
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.7k
- Forks
- 808
- Merge medio
- 21 h 22 min
- PR fusionados (30 d)
- 486
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 Effect-TS/effect
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`@effect/ui-native` (Effect-TS/ui): `kit/VirtualList` `list` part widens `R` to `any`, poisoning enclosing componentsPosiblemente ocupada @effect-bot la tomó hoy. Abierto
Effect-TS/effect#11097 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`@effect/ui-native` (Effect-TS/ui): Controlled `input` rejected-edit restore never calls `host.commit()`Posiblemente ocupada @effect-bot la tomó hoy. Abierto
Effect-TS/effect#11096 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Effect-TS/effect
Issues similares
-
check:failed streams:edit
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
iptv-org/iptv#60585 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Critical path skips a child span that ends exactly when the next one startsPosiblemente ocupada @Piyush4801 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jaegertracing/jaeger-ui#4865 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
anthropics/claude-code#112972 ·
-
Type: Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día