Skip to content

[BUG] Animate mini crash when cancelling scroll #3509

@bakura10

Description

@bakura10

Hi,

When using animateMini with scroll, trying to cancel the function to clean up scroll listeners will raise an error, causing Motion Mini to crash.

The issue can be reproduced here: https://codesandbox.io/p/devbox/vanilla-js-forked-gg4wq9?workspaceId=ws_2ajUMWBiBa7sDb8MJCFnBo

For now, the only workaround I have found is to check if the element is visible in the DOM, but this means that removing scroll listeners in a disconnectedCallback is not possible.

Thanks.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions