File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
live-view/extensions/mobile-console Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -680,19 +680,26 @@ class ConsoleSheet {
680680
681681 } ) ;
682682
683- // fix soft-hiding keyboard on Android
684683 navigator . virtualKeyboard . addEventListener ( 'geometrychange' , ( ) => {
685684
686- const keyboardHeight = navigator . virtualKeyboard . boundingRect . height ;
685+ let keyboardHeight = navigator . virtualKeyboard . boundingRect . height ;
687686
688687 body . style . setProperty ( '--keyboard-height' , keyboardHeight + 'px' ) ;
689688
690- if ( document . activeElement === input &&
691- keyboardHeight === 0 ) {
689+
690+ // prevent soft-hiding keyboard on Android
691+ onNextFrame ( ( ) => {
692692
693- input . blur ( ) ;
694-
695- }
693+ keyboardHeight = navigator . virtualKeyboard . boundingRect . height ;
694+
695+ if ( document . activeElement === input &&
696+ keyboardHeight === 0 ) {
697+
698+ input . blur ( ) ;
699+
700+ }
701+
702+ } ) ;
696703
697704 } ) ;
698705
You can’t perform that action at this time.
0 commit comments