Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat(keyboard): keyboardWillShow / keyboardWillHide give no way to match the OS keyboard animation (duration, curve)

Abierto
#2,613 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java, javascript, swift
Área
mobile-dev

Línea de trabajo

Start with the native callbacks in android/src/main/java/.../Keyboard.java and ios/Plugin/Keyboard.m, then trace KeyboardInfo in definitions.d.ts. Reproduce with a keyboard-pinned element on Android and iOS to confirm the native animation is currently lost. Done means both keyboardWillShow and keyboardWillHide expose the platform-reported duration and curve through the plugin API on both platforms.

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

Descripción

platform: android platform: ios
Plugin

Keyboard

Current Behavior

keyboardWillShow carries only keyboardHeight (definitions.d.ts L60–66, KeyboardInfo), and keyboardWillHide carries nothing (Keyboard.m L219 notifyListeners:@"keyboardWillHide" data:nil). The OS animation that moves the keyboard is not reported, although the plugin has it in hand on both platforms:

  • Android — the WindowInsetsAnimationCompat.Callback in Keyboard.java (L76–121) receives the IME animation in onStart(animation, bounds); animation.getDurationMillis() and animation.getInterpolator() are available there, but only the height is forwarded (onKeyboardEvent(EVENT_KB_WILL_SHOW, Math.round(imeHeight / density)), L104). The duration and the interpolator vary by OEM and IME — we measured 285 ms with a non-linear interpolator on Samsung One UI against a different curve on the AOSP keyboard — so no constant on the web side can match them.
  • iOS — Keyboard.m L257 reads UIKeyboardAnimationDurationUserInfoKey for its own webview resize (+0.2), and UIKeyboardAnimationCurveUserInfoKey is in the same userInfo; neither reaches JS.

The effect: anything the web layer pins to the keyboard — a chat composer, a toolbar, a bottom sheet — has to animate with a guessed duration and easing, and visibly lags or overshoots the keyboard as it opens and closes. On Android the mismatch changes from device to device. This is the same gap ionic-team/capacitor#2304 described in 2020 (closed as "tracked for reactions" and later locked); the inset-animation API on Android did not exist then and does now.

Expected Behavior

The keyboardWillShow / keyboardWillHide events give the web layer enough about the OS animation (its duration and its curve, as the platform reports them) to move a pinned element in step with the keyboard, instead of guessing.

Platform(s)
  • Android
  • iOS
Steps to Reproduce
  1. Pin an element to the keyboard: on keyboardWillShow set its bottom to keyboardHeight with a CSS transition, on keyboardWillHide set it back to 0.
  2. Open and close the keyboard on a Samsung device and on a Pixel.
  3. With any fixed transition duration/easing, the element either trails behind the keyboard or arrives before it, and the gap differs between the two devices, because the plugin reports only the final height.
Additional Context

@capacitor/keyboard 8.0.6, Capacitor 8.

Lenguaje dominante
Java
Estrellas
685
Forks
691
Merge medio
16 h 33 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ionic-team/capacitor-plugins

Todos los issues de ionic-team/capacitor-plugins

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.