I have a modal window on my webpage which contains an <iframe> with page stored on remote server. This page includes form with some <input> elements. When user hits close button on modal then modal with iframe is hiding.
Problem:
If user starts typing something in <input> within <iframe> and then closes modal, keyboard doesn't closes until he'll press Done button.
I've simplified this example and removed modal entity and presented two buttons: one is hiding modal and another removes it from the DOM.
I've tried to play with window.activeElement setting focus explicitly to different elements on the root page.(you can check it on demo), tried to call .blur() method on the iframe or iframe.contentWindow.
In my app <iframe> is hiding, but I've tried to remove it from the page.
Current behavour:
- User starts type something in
<input>within<iframe> - iOS keyboard opens
- removes/hides iframe
- iOS keyboard still opened even if the
<input>doesn't exist or hidden.
I assume that keyboard should be hidden if no element it was trigged by is anymore presented, like it's done on Android/Chrome.
I have few questions in this case:
- can I resolve this behaviour somehow in my app?
- if it's a bug in iOS or WebKit is there some bug tracker provided by Apple or community to solve this kind of issues?
