Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Do not
setUri
on HomeView's blur if no trackedWebviewInnerUri
#82 introduced `trackedWebviewInnerUri` state to keep track of WebView's URI On HomeView's blur, we would synchronize latest `trackedWebviewInnerUri` state into the `uri` state If the first user's action into the WebView is to open a cozy-app, then the HomeView's would blur with `trackedWebviewInnerUri` being null (because no navigation occurred inside of the WebView to trigger the `setTrackedWebviewInnerUri` event) This would result to calling `setUri(null)` in the blur event This behaviour was invisible to the user as `uri` would be set to cozy-home's root URL directly after that But a side effect of this is the CozyProxyWebView being unmount and remount, which would trigger the `index.html` generation process, which is unwanted By conditionally calling `setUri` based on `trackedWebviewInnerUri` nullity will prevent this behaviour
- Loading branch information