New issue
Advanced search Search tips

Issue 660943 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Oct 2016
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Download Shelf & Bookmarks bar toggle on/off don't trigger a window.resize event when window is not maximized

Reported by peter....@gmail.com, Oct 31 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36

Steps to reproduce the problem:
1.  add a listener for window.onresize
2. reduce dimensions of your window so its not full screen height
3. toggle bookmarks bar / download a file (trigger download shelf)

What is the expected behavior?
A window.onresize event should be triggered

What went wrong?
When the browser is using the full screen height (maximized or stretched vertically), Toggling the bookmarks bar or the downloads bar  triggers a resize event. When not in full height, the resize event is not triggered and window.outerHeight is not updated even though it has been affected. This has been tested on mac.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 54.0.2840.71  Channel: stable
OS Version: OS X 10.12.0
Flash Version: Shockwave Flash 23.0 r0

Not sure if relates to https://bugs.chromium.org/p/chromium/issues/detail?id=588322 since this talks about performance, flickering or guttering.
 

Comment 1 by peter....@gmail.com, Oct 31 2016

window.onresize does get triggered on FF when toggling the bookmarks bar in a non maximized window.
Status: WontFix (was: Unconfirmed)
https://developer.mozilla.org/en-US/docs/Web/Events/resize
"""
The resize event is fired when the document view has been resized.
"""

In a non-maximized Chrome Mac Window, triggering the downloads bar or bookmarks bar increasing the size of the window to make room for the bar, but does not change the size of the document view. Not firing a window.onresize event is working as intended.

Comment 3 by peter....@gmail.com, Oct 31 2016

Hi Erik,

I'd like to re-iterate this as a bug and not desired behavior because window.resize is not only for changes in the viewport but also the window size, which in this case is affecting our ability to develop an important feature in our product. This is also only on Mac Chrome, not windows.

To add to this, here's a comparison of behaviors of different browsers on different platforms.

Triggers resize event

Mac - Firefox - Full screen     - Toggle Bookmarks = true
Mac - Firefox - Not full screen - Toggle Bookmarks = true
Mac - Safari  - Full screen     - Toggle Bookmarks = true
Mac - Safari  - Not full screen - Toggle Bookmarks = true
Mac - Chrome  = Full screen     - Toggle Bookmarks = true
Mac - Chrome  = Not full screen - Toggle Bookmarks = FALSE
Mac - Chrome  = Full screen     - Toggle Download bar = true
Mac - Chrome  = Not full screen - Toggle Download bar = FALSE

Win - Firefox - Full screen     - Toggle Bookmarks = true
Win - Firefox - Not Full screen - Toggle Bookmarks = true
Win - Edge    - Full screen     - Toggle Bookmarks = true
Win - Edge    - Not Full screen - Toggle Bookmarks = true
Win - Chrome  - Full screen     - Toggle Bookmarks = true
Win - Chrome  - Not Full screen - Toggle Bookmarks = true
Win - Chrome  - Full screen     - Toggle Download bar = true
Win - Chrome  - Not Full screen - Toggle Download bar = true

This is also a bug because the window size itself changes when you toggle the downloads shelve or the bookmarks bar on chrome in non maximized state, yet the value window.outerHeight doesn't update and the resize event isn't triggered. I'm assuming these are related.

I'm working on an extension which has screen sharing (window) and needs to know when the viewport changes location. Without receiving all the resize events when things get resized, it introduces edge cases which so far have no other solutions.
@erikc...@chromium.org

Here's a bug with it not updating the window.outerHeight.

# resize window.

> resize event triggered. window.outerHeight = 901

# hide bookmarks

# no resize event

> window.outerHeight = 901. (hasn't changed)

# manually resize horizontally (to not change the height). (triggers a resize)

> window.outerHeight = 878.

So window.outerHeight is not updated after the bookmarks toggle (or downloads bar) when not in full screen. As soon as we trigger a resize event, the value updates with 23 pixels in difference. So its out of sync with the window state until a resize is triggered.

Sign in to add a comment