iOS13 - Date/Time input: blur event is not fired immediately on dialog close

In iOS <=12 - dismissing the popover would call blur event for date/time inputs.

In iOS 13 - blur is not called for input when dismissing the popover. The time/date element is only blurred the next time the user taps another focused element/different element


Sample for Safari: https://output.jsbin.com/gufocu

Sample with objective-C application with WKWebView: https://github.com/HaRaSyMNaZaR/iOSWebkitBlurSample/


Environment: iPad Safari and objective-C application with WKWebView


Safari:

1. Open https://output.jsbin.com/gufocu in Safari on iPadOS 13

2. Tap on date input

3. Select date

4. Tap on other element to close date popover


NativeWebView - Testapp ( https://github.com/HaRaSyMNaZaR/iOSWebkitBlurSample/ )

1. Launch the app via Xcode on iOs 13 device

2. Tap on date input

3. Select date

4. Tap on other element to close date popover


Actual behavior:

- iOS <=12 - blur is fired immediately after closing popover

- iOS 13 - blur is not fired immediately after closing popover. One more tap is required to fire blur event.


Expected behavior

I would expect the same behavior as in previous iOS versions.


Is there any way to have the same "old" behavior in WKWebView?

Replies

We too have same issue and impacting users operational behavior. Looking for the solutions.

Exactly, this is real problem, should be done something by Apple?


Do you find any solution yet?

Any progress?

I also have same issue in my app.

Please let us know if this issue is resolved .

I had the same issue. It is one of the most annoying bug in Safari on iOS 13 for me.


I solved this problem by manually blur the activeElement.


With jQuery it looks like this:


$('body').on('touchstart', () => {

document.activeElement.blur();

});


I hope it will help you too.

Thank you, idk jQuery, but i'm trying to adapt this solution to Vanilla JS.