Skip to content
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

Firefox screenshot scrolling not working because of .matrices style #508

Closed
wasserman opened this issue Oct 7, 2022 · 4 comments
Closed
Assignees
Labels
bug Something isn't working Points: 3 3 agile story points
Milestone

Comments

@wasserman
Copy link

I'm trying to do a scrolling screenshot with Firefox, which generally works. I see you have Excel and SVG exports, but I prefer having the appearance that matches what I see in in the navigator. This is on version v4.6.6 from https://mitre-attack.github.io/attack-navigator/#comment_underline=false.

I noticed that the inner scroller can be removed by removing the style height definition in the html.

It shows up like this:

<div class="matrices" style="height: calc(-114px + 100vh);">

If I change it via the Inspector in Web Dev Tools to this then I can take a Firefox screenshot properly via the Save full page option.

<div class="matrices" style="">

Could some option or setting be added to allow the removal of this scrollbar natively? I don't know the purpose of it, but I assume it is there for a reason.

Thanks!

@wasserman
Copy link
Author

Reference for Firefox screenshots: https://support.mozilla.org/en-US/kb/take-screenshots-firefox

@clemiller
Copy link
Contributor

Hi @wasserman,

The height of the matrices is defined to allow the toolbar to remain in place via "sticky" positioning while scrolling to the bottom of the matrix. This was implemented as part of the tabs refactor in #340.

image

This issue looks potentially related to #358, though I'm unsure if it's the toolbar that's causing issues with your screenshots. At some point there was a configuration setting added to remove the scrolling causing issues with full-page screenshots, but it appears it has since been removed. Keeping this issue open to either re-implement the configuration setting or see if we can find a better approach.

@clemiller clemiller added bug Something isn't working Points: 3 3 agile story points labels Oct 7, 2022
@wasserman
Copy link
Author

Thanks @clemiller. I honestly only even tried to do the screenshot because the print view was a bit wild. Maybe some custom css for print media would be a better improvement or something else to consider?

https://developer.mozilla.org/en-US/docs/Web/CSS/@media

@clemiller
Copy link
Contributor

Changes for this issue have been staged on develop and will be included in the upcoming Navigator release. This adds both custom css for improved printing views and a button in the toolbar to enable/disable the sticky toolbar. Thank you for your suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Points: 3 3 agile story points
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants