javascript – iOS keyboard keep focused on form input after the page on iframe is redirected


There is an iframe in a page, I noticed that on iOS after submitting a text to an search input the keyboard does not disappear after the page is reloaded and it becomes impossible to select anything inside or outside the iframe.
Here is an example: https://codesandbox.io/p/sandbox/ios-keyboard-68rcq6
Or directly open the example app here: https://68rcq6.csb.app/

Note that by pressing keyboard’s search button does not break the page if the input is outside of the iframe.

I have tried to call blur on every onload of the iframe and also calling focus on other elements has no effect, neither the keyboard closes nor the selection is possible.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img