Skip to content

Conversation

@pfeiffer
Copy link
Contributor

Closes #233.

After changing the dependency to Hotwire Native Android, opening an external (cross-domain) URL does not trigger the didOpenExternalUrl method, as that has been removed from Hotwire Native Android.

This means all visit proposals, including ones that the navigators are not able to handle, as they are 'external', to be proposed for internal navigation.

This PR fixes this by comparing the host of the WebView with the host of the proposed location and calls didOpenExternalUrl instead.

Test plan:

  1. Run demo app, tap Follow an external link. It should open the browser (default behavior)
  2. Alternatively; add onOpenExternalUrl={(location) => { console.log(location) } to the VisitableView, tap external link, confirm that the location is logged to the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: Visiting cross-domain URL does not trigger didOpenExternalUrl

1 participant