Skip to content

Conversation

rafaelbrendler-pixieset

I noticed an issue with the Keyboard plugin inaccurately resizing the view when the number row is enabled in my Gboard. The Keyboard plugin doesn't resize the view properly in this case. The reason is that the number row is added after the keyboard opening lifecycle is finished. Since the Keyboard plugin listens to setWindowInsetsAnimationCallback events (onStart and onEnd) to update the view height, it misses this last inset change after the keyboard opening animation is complete.

I propose replacing the current listener with setOnApplyWindowInsetsListener, which listens to all inset changes, enabling the plugin to properly adjust the view height whenever the keyboard height changes.

Device: Pixel 9 Pro running API level 36

Dependencies:

  • @capacitor/android: 7.4.2
  • @capacitor/app: 7.0.2
  • @capacitor/core: 7.4.2
  • @capacitor/keyboard: 7.0.2

Gboard number row option: Settings -> System -> Keyboard -> On-screen keyboard -> Gboard -> Preferences -> Number row

Capacitor configs:

  • resizeOnFullScreen: true
  • adjustMarginsForEdgeToEdge: "force"

I noticed an issue when the number row is enabled in my Gboard. The Keyboard plugin doesn't resize the view properly in this case. The reason is that the number row is added after the keyboard opening lifecycle is finished. Since the Keyboard plugin listens to `setWindowInsetsAnimationCallback` events (onStart and onEnd) to update the view height, it misses this last inset change after the keyboard opening animation is complete.

I propose replacing the current listener with `setOnApplyWindowInsetsListener`, which listens to all inset changes, enabling the plugin to properly adjust the view height whenever the keyboard height changes.

Here's the link to the issue I commented on: ionic-team#2371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant