You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I try to log in using initImplicitFlowInPopup on the OAuthService, the popup dialog will always appear on the center of my primary monitor or if the browser disallows poups crossing monitor boundaries on the edge towards the primary monitor even if the browser window with the angular application is on another monitor.
The popup dialog with the implicit flow is positioned strange
4.1 (Chrome / Edge) The popup window will be positioned on the edge of the display closest to the primary display.
4.2 (Firefox / IE) The popup window will be positioned on the center of the primary display
Expected behavior
The popup window should be centered on the parent browser window or at least centered on the same screen as the parent browser window.
Desktop (please complete the following information):
OS: Windows with 2 or more monitors
Browser Chrome 77, Firefox 71, IE11, Edge 18
Additional context
I managed to solve it by extending OAuthService and overriding the calculatePopupFeatures function. I changed the calculation of the left and top position of the window to be relative to the browser window. You can try it by clicking on the button labeled "Log in with patched OAuth service" and check out the code in patchedOAuth.service.ts on stackblitz.
Describe the bug
When I try to log in using
initImplicitFlowInPopup
on theOAuthService
, the popup dialog will always appear on the center of my primary monitor or if the browser disallows poups crossing monitor boundaries on the edge towards the primary monitor even if the browser window with the angular application is on another monitor.Stackblitz example
https://angular-tipncx.stackblitz.io/
To Reproduce
Steps to reproduce the behavior:
4.1 (Chrome / Edge) The popup window will be positioned on the edge of the display closest to the primary display.
4.2 (Firefox / IE) The popup window will be positioned on the center of the primary display
Expected behavior
The popup window should be centered on the parent browser window or at least centered on the same screen as the parent browser window.
Desktop (please complete the following information):
Additional context
I managed to solve it by extending
OAuthService
and overriding thecalculatePopupFeatures
function. I changed the calculation of theleft
andtop
position of the window to be relative to the browser window. You can try it by clicking on the button labeled "Log in with patched OAuth service" and check out the code in patchedOAuth.service.ts on stackblitz.If you want, I can create a pull request with this fix :)
The text was updated successfully, but these errors were encountered: