(e: FocusEvent)
| 51 | // We can anticipate this and resize early by handling the blur event and using the layout size. |
| 52 | let frame: number; |
| 53 | let onBlur = (e: FocusEvent) => { |
| 54 | if (visualViewport && visualViewport.scale > 1) { |
| 55 | return; |
| 56 | } |
| 57 | |
| 58 | if (willOpenKeyboard(getEventTarget(e) as Element)) { |
| 59 | // Wait one frame to see if a new element gets focused. |
| 60 | frame = requestAnimationFrame(() => { |
| 61 | let activeElement = getActiveElement(); |
| 62 | if (!activeElement || !willOpenKeyboard(activeElement)) { |
| 63 | updateSize({ |
| 64 | width: document.documentElement.clientWidth, |
| 65 | height: document.documentElement.clientHeight |
| 66 | }); |
| 67 | } |
| 68 | }); |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | updateSize(getViewportSize()); |
| 73 |
nothing calls this directly
no test coverage detected