Skip to content

Commit

Permalink
fix: Footnote may disappear on Adaptive Layout
Browse files Browse the repository at this point in the history
- fix issue #962

This fix is a workaround for the problem footnotes or float with region or column float-reference may disappear due to the problem on `checkPageFloatForLaterPage()`.
See the code comment.
  • Loading branch information
MurakamiShinyu committed Jul 18, 2022
1 parent 1428d44 commit ae45017
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/core/src/vivliostyle/ops.ts
Expand Up @@ -768,6 +768,15 @@ export class StyleInstance
const checkPageFloatForLaterPage = (
float: PageFloats.PageFloat,
): boolean => {
// FIXME: This check is incomplete when float-reference is other than "page".
// so give up for now to prevent another problem (Issue #962).
if (
!this.pageAreaWidth &&
!this.pageAreaHeight &&
float.floatReference !== PageFloats.FloatReference.PAGE
) {
return false;
}
const pageStartPos = this.layoutPositionAtPageStart.flowPositions.body;
const pageStartOffset =
pageStartPos && this.getConsumedOffset(pageStartPos);
Expand Down

0 comments on commit ae45017

Please sign in to comment.