Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): moved currentUrl assignment to onPageStarted #1275

Merged
merged 2 commits into from
May 22, 2024

Conversation

mariotaku
Copy link
Contributor

On Android, when Tauri opens a page with multiple scripts, some IPC calls gets invoked before onPageFinished callback, causing Ipc.postMessage not retrieving correct currentUrl.

This patch moved currentUrl assignment to onPageStarted, so when frontend codes make any IPC calls, the currentUrl will be up-to-date.

Fixes tauri-apps/tauri#9502.

@mariotaku mariotaku requested a review from a team as a code owner May 22, 2024 05:11
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@amrbashir amrbashir changed the title fix(android): moved currentUrl assignment to onPageStarted fix(android): moved currentUrl assignment to onPageStarted May 22, 2024
@amrbashir amrbashir merged commit b6863ed into tauri-apps:dev May 22, 2024
12 checks passed
@lucasfernog
Copy link
Member

I just faced this issue ,nice one!

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.

[bug] Android tauri-plugin capabilities disallowed
3 participants