From 59929eaab71c9c560696c41ed5f09dcdd4254893 Mon Sep 17 00:00:00 2001 From: MurakamiShinyu Date: Mon, 6 Nov 2023 13:01:05 +0900 Subject: [PATCH] fix: page breaking inside table may cause unexpected page type reset - fix #1233 --- packages/core/src/vivliostyle/vgen.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core/src/vivliostyle/vgen.ts b/packages/core/src/vivliostyle/vgen.ts index 1d23bf517..1c58acf4c 100644 --- a/packages/core/src/vivliostyle/vgen.ts +++ b/packages/core/src/vivliostyle/vgen.ts @@ -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 {