-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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(core): sync windows metadata across all windows, closes #5571 #5615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Windows.
Unfortunately this does not fix the sync issue completely. The main issue is that we use an initialization script to set the windows metadata (the init script is static and the metadata is dynamic). I started working on a fix for this when the issue was raised, I'll check if it doesn't introduce a breaking change (last time I thought it would). An easy way to test is run the API example, create a second window, close the main window, and then reload the page of the second window. The metadata will contain the |
Ahh I remembered why I didn't finish my own work, it uses the custom protocol to inject the metadata so it needs the dev server proxy to work on dev :( |
Let's try this solution for now then :( |
Disabling page reloads is a common request anyway :D Can't we use the normal IPC instead of a custom protocol? |
We can but if we use it, there'll be a small delay where you'll see a wrong list of labels. |
This reverts commit d2c6765.
Works on Windows, but it doesn't work on Linux. It seems like the first eval() call is lost on Linux, probably because the window isn't loaded yet. (i'll merge this anyway if we can't figure it out, it might be some webkit2gtk race condition). |
Ok it gives me this error: It makes sense, but if I change the script to set |
I'll push a possible wry fix and let the wry gods decide. |
When evaluating scripts immediately after creating a webview on Linux, the script runs before the page is ready, so it gets lost or fails to execute. This commit changes it to be similar to other platforms, where the evaluated scripts are executed after the initialization scripts. This issue was raised in tauri-apps/tauri#5615
Aaand I had to do the same on macOS. Maybe this is more workarounds than we should have? cc @amrbashir @wusyong (see tauri-apps/wry#815). |
I think it is fine to queue the |
* fix(linux): race condition on script eval When evaluating scripts immediately after creating a webview on Linux, the script runs before the page is ready, so it gets lost or fails to execute. This commit changes it to be similar to other platforms, where the evaluated scripts are executed after the initialization scripts. This issue was raised in tauri-apps/tauri#5615 * do the same on macOS
…s#5571 (tauri-apps#5615) Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information