feat(keyboard): keyboardWillShow / keyboardWillHide give no way to match the OS keyboard animation (duration, curve)
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
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.CallbackinKeyboard.java(L76–121) receives the IME animation inonStart(animation, bounds);animation.getDurationMillis()andanimation.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.mL257 readsUIKeyboardAnimationDurationUserInfoKeyfor its own webview resize (+0.2), andUIKeyboardAnimationCurveUserInfoKeyis in the sameuserInfo; 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
- Pin an element to the keyboard: on
keyboardWillShowset itsbottomtokeyboardHeightwith a CSS transition, onkeyboardWillHideset it back to 0. - Open and close the keyboard on a Samsung device and on a Pixel.
- 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
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 ionic-team/capacitor-plugins
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ionic-team/capacitor-plugins#2616 ·
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageAbiertotriage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
ionic-team/capacitor-plugins#2604 ·
-
triage
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
ionic-team/capacitor-plugins#2615 ·
-
triage
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
ionic-team/capacitor-plugins#2614 ·
-
bug(browser): Browser.close() on Android re-opens the last URL after a deep link back into the appPosiblemente ocupada @pramoth la tomó hace 6 días. Abiertoplatform: android platform: ios
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
ionic-team/capacitor-plugins#2610 ·
Todos los issues de ionic-team/capacitor-plugins
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
quarkusio/quarkus-agent-mcp#296 ·
Los mantenedores suelen responder en 1 día
-
enhancement web-ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
jenkinsci/jenkins#27583 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/rocketmq-dashboard#7302 ·
Los mantenedores suelen responder en 3 días
-
area: android good first issue help wanted testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Gautam-aman/ResQNet#56 ·
Los mantenedores suelen responder en 1 día