Skip to content

Commit 196b642

Browse files
authored
fix(android): Remove calculated bottom inset if keyboard is visible (#8280)
1 parent 1ef73a3 commit 196b642

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

android/capacitor/src/main/java/com/getcapacitor/plugin/SystemBars.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ private void initWindowInsetsListener() {
165165
boolean keyboardVisible = insets.isVisible(WindowInsetsCompat.Type.ime());
166166

167167
if (keyboardVisible) {
168+
safeAreaInsets = Insets.of(safeAreaInsets.left, safeAreaInsets.top, safeAreaInsets.right, 0);
169+
168170
Insets imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime());
169171
setViewMargins(v, Insets.of(0, 0, 0, imeInsets.bottom));
170172
} else {

0 commit comments

Comments
 (0)