Skip to content

bind:offsetHeight doesn't update in certain cases #4233

Closed
@plmrry

Description

@plmrry

Describe the bug
In Chrome, using bind:offsetHeight on a component that immediately changes size does not trigger a change in the offsetHeight variable:

https://codesandbox.io/s/upbeat-hill-ilkqt?fontsize=14&hidenavigation=1&module=%2FApp.svelte&theme=dark

This does not seem to happen in Firefox or Safari, but it does happen in Chrome.

To Reproduce
https://codesandbox.io/s/upbeat-hill-ilkqt?fontsize=14&hidenavigation=1&module=%2FApp.svelte&theme=dark

Expected behavior
offsetHeight should be something close to 800 (in the example above)

Notes
Is there a reason Svelte doesn't attempt to use a ResizeObserver for resize detection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueA small, encapsulated issue, ideal for a new contributor to Svelte to tackle.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions