Skip to content

Commit 8b7645a

Browse files
committed
Update console-sheet.js
1 parent 26d8d1c commit 8b7645a

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -664,23 +664,27 @@ class ConsoleSheet {
664664

665665
// enable virtual keyboard control for the console sheet
666666

667-
input.on('focus', () => {
667+
if (!isSafari) {
668668

669-
navigator.virtualKeyboard.overlaysContent = true;
670-
671-
const keyboardHeight = navigator.virtualKeyboard.boundingRect.height;
672-
673-
body.style.setProperty('--keyboard-height', keyboardHeight + 'px');
674-
675-
});
676-
677-
input.on('blur', () => {
678-
679-
navigator.virtualKeyboard.overlaysContent = false;
669+
input.on('focus', () => {
670+
671+
navigator.virtualKeyboard.overlaysContent = true;
672+
673+
const keyboardHeight = navigator.virtualKeyboard.boundingRect.height;
674+
675+
body.style.setProperty('--keyboard-height', keyboardHeight + 'px');
676+
677+
});
680678

681-
body.style.setProperty('--keyboard-height', 0);
679+
input.on('blur', () => {
680+
681+
navigator.virtualKeyboard.overlaysContent = false;
682+
683+
body.style.setProperty('--keyboard-height', 0);
684+
685+
});
682686

683-
});
687+
}
684688

685689

686690
// refocus input if clicked on return button

0 commit comments

Comments
 (0)