Skip to content

Opt-out from Auto Scroll Warning in Dev Mode #225

@Chaoste

Description

@Chaoste

Hey devs,

We've just moved our website builder over to use this library and are super happy with it. I noticed a warning when scrolling through the developer logs during development.

Auto scrolling has been attached to an element that appears not to be scrollable

Image

I see why this warning makes sense in usual scenarios. As we have added support for panning through CSS translate, it works without overflow and thus creates this warning as a false positive.

The code firing this warning already shows a comment that there could be a config parameter to opt-out from the warning if not applicable:

// Warn during development if trying to add auto scroll to an element
// that is not scrollable.
// Note: this can produce a false positive when a scroll container is not
// scrollable initially, but becomes scrollable during a drag.
// I thought of adding the warning as I think it would be a more common pitfall
// to accidentally register auto scrolling on the wrong element
// If requested, we could provide a mechanism to opt out of this warning

I'd like to get rid of this warning but I also didn't want to go with monkey patching the warning logs. Is it possible for you to add this configuration?

Thanks in advance,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions