keymanapp / keymanapp/keyman

change(ios): better handling for keyboard stability after background restoration

Open
#11,259 12 comments 0 reactions 0 assignees View on GitHub
change ios/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

After a bit more searching... maybe I've found something this time?

- https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi

We'd need to test and see if this is being called when our app is restored in this scenarios to be sure it's tied to the behavior that's been seen, of course.

Ref: https://github.com/ionic-team/capacitor/discussions/5488#Potential_solution

> The thing we need to be sensitive to is that when a WebView background termination occurs, webViewWebContentProcessDidTerminate() is invoked when the app is coming back into the foreground [...]

Noting other issues from ionic and from react, they've seen cases where the WebView is 100% crashed, showing a blank page. We haven't had _that_ issue, though we also aren't navigating across pages or doing other fancy web-server stuff on the back-end - it's just one page for us... albeit with a WebWorker backend and linked-in JS scripts. There's a fair shot that iOS's WebView is doing its best to restore our page after such a termination but is coming up short.

- Example `react` issue: https://github.com/react-native-webview/react-native-webview/issues/3062

One concerning thing here, though - these are big teams that are struggling to get this scenario right if this is indeed a match for our circumstances.

_Originally posted by @jahorton in https://github.com/keymanapp/keyman/issues/10952#issuecomment-2065585146_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.