fix: Fixed issue where moving the floating keyboard on iPad would lead to blank space on screen
This commit is contained in:
@@ -373,10 +373,17 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
void this.getThemeService().handleMobileColorSchemeChangeEvent()
|
||||
}
|
||||
|
||||
handleMobileKeyboardWillChangeFrameEvent(frame: { height: number; contentHeight: number }): void {
|
||||
handleMobileKeyboardWillChangeFrameEvent(frame: {
|
||||
height: number
|
||||
contentHeight: number
|
||||
isFloatingKeyboard: boolean
|
||||
}): void {
|
||||
if (frame.contentHeight > 0) {
|
||||
setCustomViewportHeight(frame.contentHeight, 'px', true)
|
||||
}
|
||||
if (frame.isFloatingKeyboard) {
|
||||
setCustomViewportHeight(100, 'vh', true)
|
||||
}
|
||||
this.notifyWebEvent(WebAppEvent.MobileKeyboardWillChangeFrame, frame)
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export class MobileWebReceiver {
|
||||
break
|
||||
case ReactNativeToWebEvent.KeyboardFrameWillChange:
|
||||
void this.application.handleMobileKeyboardWillChangeFrameEvent(
|
||||
messageData as { height: number; contentHeight: number },
|
||||
messageData as { height: number; contentHeight: number; isFloatingKeyboard: boolean },
|
||||
)
|
||||
break
|
||||
case ReactNativeToWebEvent.KeyboardFrameDidChange:
|
||||
|
||||
Reference in New Issue
Block a user