fix: Fixed issue with keyboard on Android covering content (#2899)

This commit is contained in:
Aman Harwara
2025-05-02 15:16:32 +05:30
committed by GitHub
parent 16df4d327c
commit c4e0138ce3
6 changed files with 40 additions and 32 deletions

View File

@@ -357,8 +357,8 @@ export class WebApplication extends SNApplication implements WebApplicationInter
this.notifyWebEvent(WebAppEvent.MobileKeyboardWillChangeFrame, frame)
}
handleMobileKeyboardDidChangeFrameEvent(frame: { height: number; contentHeight: number }): void {
this.notifyWebEvent(WebAppEvent.MobileKeyboardDidChangeFrame, frame)
handleMobileKeyboardDidHideEvent(): void {
setCustomViewportHeight(100, 'vh', true)
}
handleOpenFilePreviewEvent({ id }: { id: string }): void {

View File

@@ -73,15 +73,13 @@ export class MobileWebReceiver {
case ReactNativeToWebEvent.ColorSchemeChanged:
void this.application.handleMobileColorSchemeChangeEvent()
break
case ReactNativeToWebEvent.KeyboardFrameWillChange:
case ReactNativeToWebEvent.KeyboardSizeChanged:
void this.application.handleMobileKeyboardWillChangeFrameEvent(
messageData as { height: number; contentHeight: number; isFloatingKeyboard: boolean },
)
break
case ReactNativeToWebEvent.KeyboardFrameDidChange:
void this.application.handleMobileKeyboardDidChangeFrameEvent(
messageData as { height: number; contentHeight: number },
)
case ReactNativeToWebEvent.KeyboardDidHide:
void this.application.handleMobileKeyboardDidHideEvent()
break
case ReactNativeToWebEvent.ReceivedFile:
void this.application.handleReceivedFileEvent(