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
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
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.
I see why this warning makes sense in usual scenarios. As we have added support for panning through CSS translate, it works without
overflowand 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:
pragmatic-drag-and-drop/packages/auto-scroll/src/over-element/make-api.ts
Lines 25 to 31 in d5a129c
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