Resize event for visualViewport in iframe doesn't fire if container element was hidden
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: iriz1994, Assigned: tnikkel)
References
Details
Attachments
(2 files)
Steps to reproduce:
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Resize event for visualViewport in iframe doesn't fire if container element was hidden.
(1) Open https://jsfiddle.net/kq1Lc0fo/
(2) Open the console
Actual results:
Only "W resize" output
Expected results:
Print "VW resize" and "W resize" after page is loaded
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
I can reproduce, but only about 20% of the time.
Assignee | ||
Comment 3•3 years ago
|
||
I added this check in bug 1725569 because I said it matched other browsers. I'm not sure what testing I did there, or I made a mistake or what but the behaviour is not consistent between browsers.
For top level documents on initial load Safari sends a resize event, Chrome does not. Firefox sends a resize event.
For iframes Chrome and Safari send a resize event. Firefox usually sends a resize event.
Given the inconsistent behaviour here it seems better to err on the side of sending resize events because sites depend on it and might not work without it.
In the testcase from the bug I am able to reproduce about 20% of the time, and the problem is the first reflow check. So I'm removing that and I think it will fix the problem the user is seeing (which sounds to be more consistent).
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/47c0d5a85cd7 Always fire visual viewport resize event even if first reflow. r=botond https://hg.mozilla.org/integration/autoland/rev/e2dfad4efbed Add test. r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32424 for changes under testing/web-platform/tests
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/47c0d5a85cd7
https://hg.mozilla.org/mozilla-central/rev/e2dfad4efbed
Upstream PR merged by moz-wptsync-bot
Description
•