()
| 39 | |
| 40 | // Use visualViewport api to track available height even on iOS virtual keyboard opening |
| 41 | let onResize = () => { |
| 42 | // Ignore updates when zoomed. |
| 43 | if (visualViewport && visualViewport.scale > 1) { |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | updateSize(getViewportSize()); |
| 48 | }; |
| 49 | |
| 50 | // When closing the keyboard, WebKit on iOS does not fire the visual viewport resize event until the animation is complete. |
| 51 | // We can anticipate this and resize early by handling the blur event and using the layout size. |
no test coverage detected