Forum Discussion
IE Mode - Edge ignores user preference for popup window position
Hello,
I've had some users report some odd behavior with IE Mode popup windows that I've been able to duplicate. Depending on the user's dpi settings, popup windows may open partially offscreen. When the user drags the window back onscreen, Edge does not remember the new popup window position preference for next time (whether or not the browser restarts). Running the same site in Edge Mode works fine. Site also works fine in Internet Explorer.
The popups we are calling basically work like this:
<input type="button" onclick="window.open('test.pdf', '_blank', 'resizable');" value="click me" />
Edge looks like it keeps an entry in its preferences file to record the window position:
"window_placement_popup":{"bottom":-894,"left":759,"maximized":false,"right":1778,"top":-1722,"work_area_bottom":-40,"work_area_left":-770,"work_area_right":2303,"work_area_top":-1728}
These position values do change when a popup window is relocated on the screen by the user, but they are reset if the popup is closed and re-opened, and the window opens in its original position. The value they get reset to seems to change depending on what DPI you have set.
It looks like Internet Explorer stores the location preference of its popup windows in HKCU>Software>Microsoft>Internet Explorer>Main>Window_Placement, but changing this value doesn't have an effect on IE Mode popups either.
I suspect the IE engine is not reading either of these preference locations and just reverting back to a default value each time a popup window is opened.
Any insight from someone working on IE Mode? Or does anyone have a clever workaround?
Thanks!
- Kelly_YMicrosoft
AndrewSAIF Hello Again! Just to confirm, the question/request is to have the popup window preference remembered? Basically if the popup window opens offscreen and the user moves it onscreen, the next time the popup window opens it will open onscreen. Is that correct?
You mentioned this works fine in Edge mode and also on IE. Does that mean in subsequent openings, the popup window is opened onscreen where the user moved it previously?
Thanks!
-Kelly
- AndrewSAIFIron Contributor
Hi Kelly,
Thanks for the response. Yes, my preference/expected behavior would be that Edge opens popups in IE Mode respecting the screen boundaries and if the window for some reason opens outside the screen bounds, there should be a way for the user to remedy this for subsequent opens.
I went back and retested IE and Edge based on your second paragraph. It appears that I was mistaken in my assumption that IE and Edge were remembering the user preference. At least in Edge, the window position is recorded in the preferences file, but this doesn't seem to control where the window will open next. However, both IE and Edge (in Edge mode) correctly respect the screen bounds when opening these popups.
After a little more testing I think Edge might be opening these windows out of bounds only when multiple displays are present, and not all displays are using the same scaling (such as when an external monitor is connected to a laptop).
It should be possible to duplicate the issue this way:
- Set the main display to 125% scaling
- Connect a 2nd display and set it to 100% scaling
- Open an Edge window full screen on the 2nd display
- Invoke the type of popup in IE Mode described in my original post (window.open)
The window will open at least partially offscreen. It may be necessary to change the relative position of the displays in Display Settings to wind up with a configuration that results in an offscreen window.
Maybe IE Mode is basing the popup position on the main display scaling for all displays?
- Kelly_YMicrosoft
AndrewSAIF Thanks for the additional information! I will check with the IE Mode team and follow up with any updates from them.
-Kelly