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