Save visible does not always capture visible view port
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1710635
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Save visible does not always capture visible view port
Categories
(Firefox :: Screenshots, defect, P2)
Tracking
(regression bug RESOLVED as FIXED)
91 Branch
People
(Reporter: igor, Assigned: kajalsah107)
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
Steps to reproduce:
Use Firefox 88 (87 doesn't have this issue)
Open https://getbootstrap.com/docs/4.0/components/modal/#vertically-centered
Click "Launch demo modal" button on the page, modal widget will be shown.
Right click -> Take Screenshot -> Save Visible
Actual results:
The screenshot preview shows page rendering without modal widget
Expected results:
The screenshot preview should show page with modal widget, exactly as browser window.
The worst consequence of this bug is that selenium webdriver produces invalid screenshots now making visual tests fail.
The Bugbug bot thinks this bug should belong to the 'Firefox::Screenshots' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Hi,
I am able to reproduce the issue in release 88, beta 89.0b10 and latest nightly 90.0a1 (2021-05-12) using Windows 10.
This is a recent regression since Fx 87 is not affected.
Thanks for your input!
It looks like if we remove https://searchfox.org/mozilla-central/rev/5fe255d4f6e7d7c6794d81fabe90d75ece7bb2a4/browser/extensions/screenshots/background/takeshot.js#40-46, the modal will be captured.
I think we only want to enter that else
block for custom selections.
Something like else if (!isCaptureVisible)
. Instead of passing isFullPage
, let's go ahead and change that parameter to screenshotType
to account for both cases.
I see that this case is being marked as wontfix and optional and would like to stress that it has quite severe implication:
The same incorrect screenshots are observed in selenium tests with Firefox. It prevents people from doing automated visual testing of bootstrap dialog boxes (and probably other things) in Firefox.
Is this something we should consider nominating for Beta uplift for Fx90?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK