New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 596353 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug



Sign in to add a comment

page-break-after: always does not work correctly when printing from Chrome

Reported by choose...@gmail.com, Mar 21 2016

Issue description

Chrome Version       : 49.0.2623.87
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: OK
    Firefox: OK
         IE: OK

What steps will reproduce the problem?  
 (1) open the page
 (2) Right-click and select print from the pop-up menu
 (3) In the preview page, select Landscape, Letter, Margin:Default. Scroll to page 500. 
  
<html>
<head> 
    <style type="text/css" >  
        .pageBreak {          
           page-break-before: always;
        }                                     
    </style>                       
</head>
<body>
<div id="whatever"></div>
<script type="text/javascript">
    var e = document.getElementById("whatever");                                                                            
    var str = "";                                                                                             
    var vPageNum = 0;   
    for(var i=0,vLen=1000;i<vLen;i++){
      str += "<p>AAAAAAAAAA</p><p>BBBBBBBBBBB</p>";
      str += "<span>--------------- Page Break (" + vPageNum++ + ") ---------------</span>";   

      str += "<div class ='pageBreak'></div>";
    }                                                                                                            
    e.innerHTML = str;
</script>
</body>

What is the expected result?
Print the page correctly.

What happens instead?
I was trying to print the sample page above, but found in the print preview page, with certain printing options, from around page 500, the first line of each page was partially chopped off. See the attached files for details.

Please provide any additional information below. Attach a screenshot if
possible.
 
page-break.jpg
56.9 KB View Download
page_break.html
941 bytes View Download

Comment 1 by choose...@gmail.com, Mar 21 2016

OS: Windows 8.1
Labels: -Pri-3 Needs-Feedback OS-Windows Pri-1
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on win8.1 chrome version 49.0.2623.87

This is working fine in latest canary

Seems the issue got fixed in latest builds.
choose247@, Could you please check the same on latest canary and update the thread.
Cc: vitalyb...@chromium.org

Comment 4 by choose...@gmail.com, Mar 22 2016

Thank you so much. 
On latest canary, it all looks good now.
Cc: -vitalyb...@chromium.org thestig@chromium.org
Components: Internals>Printing
I don't work on printing any more.
Components: Blink>CSS
Did this ever work before Chrome 49? Not obvious if it was:

a) always broken, and recently fixed
or
b) was working, broke, and got fixed again
Cc: msten...@opera.com cbiesin...@chromium.org
Components: -Blink>CSS Blink>Layout
Morten may have fixed this recently?

Comment 8 by e...@chromium.org, Mar 29 2016

Status: Fixed (was: Untriaged)
Used to sort-of-work, then got broken and finally fixed for real.

Comment 9 by msten...@opera.com, Mar 30 2016

Can reproduce in Chrome 49. Works fine in Chrome 50.
I doubt that I had anything to do with fixing this, though.

Sign in to add a comment