|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
I'm looking into using different engines. Mainly, actually, because I'm having bugs that each time I create a new WebView it's "remembering" the zoomFactor of the previous one. This could be a bug in the product but I don't have time to determine that, I might just use engines. But the documentation is wrong - there is no such "Engine" property on WebView (I'm using 15.2.65). And I cannot find anything even remotely similar. Can you explain what changes have been made since this documentation was written http://www.essentialobjects.com/doc/webbrowser/overview.aspx#start//Associate webView1 to engine1 webView1.Engine = engine1;
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Please update to the latest build. The Engine properly was added not long ago and it did not exist in your version.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
OK, thank you. BTW my bug was fixed by explicitly calling Destroy() on the WebView before I created the next one. As mentioned, if I didn't do this, then the zoomFactor would "carried over" from one WebView to a completely separate object, newed up separately. ie I would create a new WebView() and it would automatically come with a zoomFactor of say 1.4. Which was the zoomFactor of another object I just finished using and had no reference to at all.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
This is not a bug. Chrome does this on purpose. It saves the last zoom factor you have for one website and if you open another tab again from the same host, it will apply the same zoom factor. This is what most people want --- they want to set the zoom factor for one website once instead of setting it every time. Calling WebView.Destroy to close your last WebView has the "side effect" of shutting down the browser process, thus discard this setting for you.
|
|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
eo_support wrote:This is not a bug. Chrome does this on purpose. It saves the last zoom factor you have for one website and if you open another tab again from the same host I see, I understand that - though it makes no sense for my use case. I still think there's a bug though, because I set the zoom to 100% at this point -> *and it does not take effect*. The WebView stays at 140%. No matter how many times I set it, I cannot return the zoom factor to 100%, because it has *remembered* the previous value of 140% It looks like I need to set it to a value that is *not* 100% and then set 100% - and only then the zoom factor is returned to 100%. Logically it's 100% BTW, When it's 140% the ZoomFactor returns 100%, but viewing, it is clearly not. Is there any explanation for that?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
I agree with you that you should be able to reset it to 100%. We will look into this and see what we can do.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
Thanks.
FYI, to make this work I currently do this when closing the parent form/control NB it doesn't matter how many times I set the zoomFactor to 1 - it won't work unless it goes to *not 1*, then 1.
Browser.SetZoom(0.99f); Browser.Stop(); Browser.SetZoom(1); ParentControl.Dispose(); //
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We have posted a new build that made some improvements on this issue. In the new build it behaves as follows:
1. User adjusts zoom factor for WebView A to value X; 2. User opens a new empty WebView B. This WebView's ZoomFactor will default to 1; 3. User loads the same Url (or Url of the same site) into WebView B; 4. The browser engine uses the zoom factor it "remembered" for the same site; 5. WebView B's ZoomFactor is changed to X and its ZoomFactorChanged event is fired;
Step 5 does not happen in older builds, thus causing the mismatch between WebView.ZoomFactor and the actual zoom factor value. This build fixed this issue. After step 5 you can force it back to 1 and it should accept the new value.
Thanks!
|
|