()
| 6 | const keyboardThreshold = 120; |
| 7 | |
| 8 | const isEditing = (): boolean => |
| 9 | !!document.activeElement?.matches?.( |
| 10 | 'input, textarea, [contenteditable="true"]', |
| 11 | ); |
| 12 | |
| 13 | // Phone browsers don't resize the page for the keyboard: they scroll it |
| 14 | // under the keyboard instead, which takes the shell's top block off screen |