Skip to content

Sticky blocks inside layout loose their stickiness #6203

@MDLC01

Description

@MDLC01

Description

Consider the following piece of code:

#v(15cm)
#context block(sticky: true)[I should stick to the rectangle.]
#rect(height: 10cm, width: 1cm, fill: gray)

The sticky block sticks to the rectangle as expected, even though it is within a context block.

Now, replace context with a call to layout:

#v(15cm)
#layout(_ => block(sticky: true)[I should stick to the rectangle.])
#rect(height: 10cm, width: 1cm, fill: gray)

This time, the sticky block appears alone on the first page.

Reproduction URL

No response

Operating system

No response

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglayoutRelated to the layout category, which is about composing, positioning, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions