Skip to content

Commit

Permalink
Fix condition for page-break-inside: avoid
Browse files Browse the repository at this point in the history
  • Loading branch information
alfattack committed Aug 20, 2024
1 parent 918fc8d commit 3dc6752
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Source/HtmlRenderer/Core/Dom/CssBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,7 @@ protected virtual async Task PerformLayoutImpAsync(RGraphics g)
{
this.BreakPage(true);
}
else if (this.PageBreakInside == CssConstants.Avoid
&& ActualHeight + Location.Y > HtmlContainer.PageSize.Height
&& prevSibling != null)
else if (this.PageBreakInside == CssConstants.Avoid && prevSibling != null)
{
// handle page break avoiding.
var pageLocationY = Location.Y % HtmlContainer.PageSize.Height;
Expand Down

0 comments on commit 3dc6752

Please sign in to comment.