-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Get zoom level from the browser host instead #2022
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
Conversation
Is it safe to Wait for the task to execute? I really dislike Wait, I've seen far too many deadlocks |
In my tests it didn't deadlock, it can of course happen. In my application (Offscreen processes doing work) I use Wait on JS execution and haven't seen a deadlock yet EDIT: |
I'm still not keen on this. It's also we would be blocking the UI thread. |
Another solution is to have the zoom commands send the new zoom value to all other browser instances on the same domain. Though that wouldn't work if you were to open the page after the initial zoom as it would show 0 no matter what the value is |
Is a fix actually required? The simplest workaround is to isolate each browser and let them zoom independently. |
If one wants the
Waiting for |
How about providing an example of your idea as an attached property? Get some real world feedback. There is nothing stopping a user from implementing their own solution. |
I'm not quite sure what you mean, could you attempt to clarify? |
Using this in conjunction with my proposed fix for #1915 causes a deadlock. The simplest fix may well be updating if(isVisible)
{
browser.GetHost().GetZoomLevelAsync().ContinueWith(previous =>
{
if (!IsDisposed)
{
SetCurrentValue(ZoomLevelProperty, previous.Result);
}
}, TaskContinuationOptions.OnlyOnRanToCompletion);
} The
Adding |
I don't have any plans to do anything with this PR, so i'm closing this. |
Resolves #1778
ZoomLevelProperty