Skip to content

Commit f262004

Browse files
committed
Update console-sheet.js
1 parent 206115b commit f262004

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

live-view/extensions/mobile-console/console-sheet.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,11 @@ class ConsoleSheet {
676676

677677
navigator.virtualKeyboard.overlaysContent = false;
678678

679-
body.style.setProperty('--keyboard-height', 0);
679+
onNextFrame(() => {
680+
681+
body.style.setProperty('--keyboard-height', 0);
682+
683+
});
680684

681685
});
682686

@@ -688,18 +692,15 @@ class ConsoleSheet {
688692

689693

690694
// prevent soft-hiding keyboard on Android
691-
onNextFrame(() => {
692-
693-
keyboardHeight = navigator.virtualKeyboard.boundingRect.height;
694695

695-
if (document.activeElement === input &&
696-
keyboardHeight === 0) {
697-
698-
input.blur();
699-
700-
}
696+
keyboardHeight = navigator.virtualKeyboard.boundingRect.height;
697+
698+
if (document.activeElement === input &&
699+
keyboardHeight === 0) {
701700

702-
});
701+
input.blur();
702+
703+
}
703704

704705
});
705706

0 commit comments

Comments
 (0)