Created attachment 8862482 [details] scrolltopbug.html User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170418123315 Steps to reproduce: I have partially visible contents in <div> tags, which are scrolled to specific locations. (I do so as a preparation step for printing out larger contents with controlled page breaks.) Actual results: The scrolling for the printing device is ignored. It always starts at the top position. Expected results: WYSIWYG: the scrolling of the screen should be taken over when using print media. (Chromium 58.0 shows this IMHO correct behaviour.) How to reproduce: Open the attached file in Firefox and examine the difference between scrolling on screen and printer.
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Hmm, I guess we could try to guess the scrolling position when cloning nodes for printing. But it would be rather a guess only. Printing may affect to the layout quite a bit so whether the position is in right location isn't clear. In practice the right solution is probably to modify the page in beforeprint event listener so that the expected layout can be achieved. (or perhaps some printing specific .css would work too)
FWIW, on linux using Chrome to print that page is all wrong. I don't see any text.
Do CSS specs define this kind of case at all?
You need to log in before you can comment on or make changes to this bug.