-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Fix popup/notification when browser is in fullscreen, primarily on macOS. #9075
Conversation
The issue was reported internally via Slack. User was running Mac OSX Chrome in fullscreen mode where Chrome is created in a new Desktop workspace. The issue reproduced on OSX Chrome in fullscreen/maximized view overrides the explicitly set width and height for `windows.create()`. Possibly not overrides, but creates a window based off of the window that it was created from. Found a related [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=263092&q=window%20create%20width%20os%3DMac&can=2). The fullscreen `popup.left` pixel will calculate the window position incorrectly since we set and assume the width of the created window. The incorrect `left` position the window and transition the focus Desktop/Workspace incorrectly and make is seem to lose focus of the new window/workspace. Incidentally this will make the popup full width/height, and create a new workspace for the view, which we have no control over until Chrome fixes it. This will check if the popup is 'fullscreen', which it gets passed from the origin window, if so then don't reposition the window. If Chrome fixes the issue we can revert this change.
Builds ready [68bd4a5]
Page Load Metrics (657 ± 34 ms)
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! This additional window position update is definitely not desired on fullscreen.
I'm not entirely sure how those two linked Chrome bugs are related? The first seems to relate to max/min window sizes specifically (which is a feature of the Chrome App API, not the Extension API), and the second seems to be about a maximum popup size (which we aren't trying to exceed here). But nonetheless, this change is good.
Co-authored-by: Mark Stacey <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Builds ready [44d6e5d]
Page Load Metrics (649 ± 51 ms)
|
…cOS. (#9075) * Fix popup/notification when browser is in fullscreen, primarily on OSX. The issue was reported internally via Slack. User was running Mac OSX Chrome in fullscreen mode where Chrome is created in a new Desktop workspace. The issue reproduced on OSX Chrome in fullscreen/maximized view overrides the explicitly set width and height for `windows.create()`. Possibly not overrides, but creates a window based off of the window that it was created from. Found a related [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=263092&q=window%20create%20width%20os%3DMac&can=2). The fullscreen `popup.left` pixel will calculate the window position incorrectly since we set and assume the width of the created window. The incorrect `left` position the window and transition the focus Desktop/Workspace incorrectly and make is seem to lose focus of the new window/workspace. Incidentally this will make the popup full width/height, and create a new workspace for the view, which we have no control over until Chrome fixes it. This will check if the popup is 'fullscreen', which it gets passed from the origin window, if so then don't reposition the window. If Chrome fixes the issue we can revert this change. * Feedback commit Co-authored-by: Mark Stacey <[email protected]> Co-authored-by: Mark Stacey <[email protected]>
The issue was reported internally via Slack. User was running macOS Chrome in fullscreen mode where Chrome is created in a new Desktop workspace.
The issue reproduced on macOS Chrome in fullscreen/maximized view overrides the explicitly set width and height for
windows.create()
. Possibly not overrides, but creates a window based off of the window that it was created from. Related Chrome bugs 1 2The fullscreen
popup.left
pixel will calculate the window position incorrectly since we set and assume the width of the created window. The incorrectleft
position the window and transition the focus Desktop/Workspace incorrectly and make it seem to lose focus of the new window/workspace. Incidentally this will make the popup full width/height, and create a new workspace for the view, which we have no control over until Chrome fixes it.This will check if the popup is 'fullscreen', which it gets passed from the origin window, if so then don't reposition the window. If Chrome fixes the issue we can revert this change.
Screenshots are of the inconsistent scoped window attributes on Chrome and Firefox. Both are in Fullscreen/Desktop/Workspace and initiating a Connect Request, or any action that triggers popup/notification ui.
Chrome lastFocused
Firefox lastFocused
Chrome created popupWindow
Firefox created popupWindow
Bug 1
Bug 2