fix(chat): simplify Xiaomi Facebook keyboard lift
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
import { INPUT_LIFT_VAR, KEYBOARD_VAR, VIEWPORT_VAR } from "./constants";
|
||||
|
||||
export function setKeyboardHeightVar(height: number): void {
|
||||
document.documentElement.style.setProperty(KEYBOARD_VAR, `${height}px`);
|
||||
}
|
||||
|
||||
export function setViewportHeightVar(height: number): void {
|
||||
document.documentElement.style.setProperty(VIEWPORT_VAR, `${height}px`);
|
||||
}
|
||||
import { INPUT_LIFT_VAR } from "./constants";
|
||||
|
||||
export function setInputLiftVar(lift: number): void {
|
||||
document.documentElement.style.setProperty(INPUT_LIFT_VAR, `${lift}px`);
|
||||
}
|
||||
|
||||
export function resetKeyboardVars(): void {
|
||||
document.documentElement.style.setProperty(KEYBOARD_VAR, "0px");
|
||||
document.documentElement.style.setProperty(VIEWPORT_VAR, "100dvh");
|
||||
export function resetInputLiftVar(): void {
|
||||
document.documentElement.style.setProperty(INPUT_LIFT_VAR, "0px");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user