Skip to content

Commit

Permalink
fix: page breaking inside table may cause unexpected page type reset
Browse files Browse the repository at this point in the history
- fix #1233
  • Loading branch information
MurakamiShinyu committed Nov 6, 2023
1 parent 0d64885 commit 59929ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/src/vivliostyle/vgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,14 @@ export class ViewFactory
const pageVal: Css.Val = computedStyle["page"];
let pageType =
pageVal && !Css.isDefaultingValue(pageVal) && pageVal.toString();
if (
!pageType &&
!this.nodeContext.parent &&
this.nodeContext.shadowContext
) {
// Keep currentPageType for shadowContext (Fix for issue #1233)
pageType = this.styler.cascade.currentPageType;
}
if (!pageType || pageType.toLowerCase() === "auto") {
pageType = this.nodeContext.pageType;
} else {
Expand Down

0 comments on commit 59929ea

Please sign in to comment.