Forum Discussion

AndrewSAIF's avatar
AndrewSAIF
Iron Contributor
Aug 19, 2020

Possible IE Mode bug - window.open with pdf target causes Edge to adjust zoom

Hi all,

 

We recently deployed Edge to our organization, and while most things are working great, we noticed some strange behavior that got introduced in v84 when Edge gained the ability to remember a user's zoom preference on IE Mode sites. 

We have several web apps we run in IE Mode that use an onclick window.open to display a PDF in a new popup window. Here is an example that would (hopefully) allow you to duplicate the issue:

 

<input type="button" onclick="window.open('test.pdf', '_blank', 'resizable');" value="click me" />
 
When the user clicks the button, the zoom level is automatically adjusted. If the parent site was on the same subdomain as the new popup, Edge saves the new zoom setting as their preference. So the next time they load the parent site, it is zoomed out relative to their preference. It seems like the amount the zoom is adjusted depends on the user's display scaling. At 100% display scaling, you may have to adjust the zoom to a value higher than 100% to notice the change. 
 
I have gone through all of the document display options in Adobe Reader to try and keep this from happening, but even if I match the desired zoom level in Reader or specify Actual size, Edge zooms out when the window loads. We use Reader 2017 normally, but I tried with the latest Reader DC and got the same result. 

Interestingly, if I create a test page with the window.open method above and call another web page rather than a PDF, it opens fine without zooming out. So I believe this is specifically related to Edge's handling of the Reader plugin through IE Mode and not window.open itself. 
 
Anyone else noticing this issue, or any insight from someone who works on IE Mode? 
 
Thanks,
Andrew
 
  • AndrewSAIF's avatar
    AndrewSAIF
    Iron Contributor

    Here is a log showing the zoom changing without user interaction. The redacted URLs are both the same, but it seems like Edge is correctly reading the 100% zoom preference, then pulling 80% out of nowhere.

     

    System used has 3 displays. 2 at 1440p w/ 100% scaling and 1 1080p at 125% scaling. The zoom changes on the 1080p display. I believe it is possible to duplicate on any display scaling other than 100%. 

     

    [17692:17376:0831/153523.492:VERBOSE1:dual_engine_tab_helper_win.cc(250)] CheckInternetExplorerNavigationEntry URL matches IE11 or NEUTRAL rule on sitelist: [REDACTED]
    [17692:17376:0831/153523.492:VERBOSE1:internet_explorer_tab_host_win.cc(661)] SetZoom zoom_percent = 100
    [17692:17376:0831/153523.493:VERBOSE1:internet_explorer_tab_host_win.cc(1076)] OnDocumentModeSet document_mode = 110000
    [17692:17376:0831/153523.493:VERBOSE1:internet_explorer_tab_host_win.cc(1261)] OnHasBeforeUnloadChanged has_before_unload = 0
    [17692:17376:0831/153523.513:VERBOSE1:internet_explorer_focus_watcher_win.cc(39)] IE focused:0000000000111006 IE window:00000000006B165E
    [17692:17376:0831/153523.523:VERBOSE1:internet_explorer_tab_host_win.cc(483)] OnLoadingActivityChanged is_loading = 1
    [17692:17376:0831/153523.523:VERBOSE1:internet_explorer_tab_host_win.cc(453)] OnFinishedSetFocus old focusing_ie_timer_ running = 1 browser_window = 00000000006B165E focus = 0000000000111006
    [17692:17376:0831/153523.541:VERBOSE1:internet_explorer_tab_host_win.cc(511)] RequestHostWindowFocus is_focused = 1
    [928:4832:0831/153523.617:VERBOSE1:network_delegate.cc(32)] NetworkDelegate::NotifyBeforeURLRequest: https://business.bing.com/api/v3/bookmarks
    [928:4832:0831/153523.824:VERBOSE1:network_delegate.cc(32)] NetworkDelegate::NotifyBeforeURLRequest: https://graph.microsoft.com/v1.0/me/people?$top=1500&$select=id,displayName,jobTitle&$filter=personType/class%20eq%20%27Person%27%20and%20personType/subclass%20eq%20%27OrganizationUser%27
    [17692:17376:0831/153524.493:VERBOSE1:internet_explorer_tab_host_win.cc(1261)] OnHasBeforeUnloadChanged has_before_unload = 1
    [17692:17376:0831/153524.499:VERBOSE1:internet_explorer_tab_host_win.cc(1063)] OnZoomChanged zoom_percent = 100
    [17692:17376:0831/153524.553:VERBOSE1:internet_explorer_tab_host_win.cc(383)] InternetExplorerDidNavigate pending_nav_entry_id_ = 0
    [17692:17376:0831/153524.557:VERBOSE1:dual_engine_tab_helper_win.cc(250)] CheckInternetExplorerNavigationEntry URL matches IE11 or NEUTRAL rule on sitelist: [REDACTED]
    [17692:17376:0831/153524.558:VERBOSE1:internet_explorer_tab_host_win.cc(661)] SetZoom zoom_percent = 80
    [17692:17376:0831/153524.571:VERBOSE1:internet_explorer_tab_host_win.cc(1076)] OnDocumentModeSet document_mode = 0

    • Kelly_Y's avatar
      Kelly_Y
      Icon for Microsoft rankMicrosoft

      AndrewSAIF Hi!  Thanks for the detailed information!  I've passed this on to our IE Mode team and will let you know if they have any updates or insights.  

       

      -Kelly

  • chrish16805's avatar
    chrish16805
    Copper Contributor

    AndrewSAIF 

    We have the exact same issue, been banging our heads the past few days trying to track the cause down.

     

    We can replicate the issue.

     

    We found the issue on a 4k laptop and screen. Loading one of our web apps in IE Mode clicking on a pdf opens in new tab, go back to the web app tab and it zooms out.  We've found if you also set the Windows display properties dpi to another value such as 125% on a 1920x1080 screen when you load the pdf it zooms out to 80%, then because the web app is on the same domain as the pdf when going back to the web app its zoomed out to 80% also.

    If I set the dpi zoom to 150% on a 1920x1080 resolution screen and load the pdf it zooms out to 67%.  At first we thought it was the Adobe settings zooming out to page width, but I've set Adobe zoom to 10% and reloaded the pdf in IE Mode and that appears tiny at 10% but Edge still zooms out for some reason.

    We would use the Edge Chromium built in pdf viewer but layers don't show, so have to use IE Mode so it loads the Adobe viewer instead.

    We are currently using 86.0.622.51 but I've also tried dev build 88.0.673.0

    • chrish16805's avatar
      chrish16805
      Copper Contributor

      chrish16805 

       

      We have found two workarounds for now but not ideal.  Add the switches to the program shortcut to stop it using the 125% or 150% dpi scaling setting in Windows and use 100% natively.

       

      "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" /high-dpi-support=1 /force-device-scale-factor=1
       
      Not ideal as on a laptop 4k screen as the resolution is so high the address bar and menu items can hardly be seen.
       
      Alternatively, change the resolution to a lower resolution, in our case 1920x1200 and 100% dpi setting also fixes it, but obviously items then become a bit fuzzy around the edges.
       
      Hopefully Microsoft can come up with a true fix.
      • Kelly_Y's avatar
        Kelly_Y
        Icon for Microsoft rankMicrosoft

        chrish16805 AndrewSAIF  Hi!  Thank you both for the information!  Just to give a quick update, our team has investigated and they are currently working on a fix.  There is no firm ETA quite yet for the fix.  We need to work with the Windows team on this so it might take a little longer but we'll be sure to follow up here with updates.  

         

        -Kelly

Resources