-
Notifications
You must be signed in to change notification settings - Fork 43
Description
In quaive the main scroll container is #portal. We listen for scroll events on window. While document scroll events do bubble up, scroll events on individual elements do not.
When scrolling on #portal, the event never reaches window and the scroll detection does not work.
See:
https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event
https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event
The best way to fix this would be to create a pattern out of the scroll detection logic (currently it initializes without an element).
Then add it as class to the elements where it should be initialized. This would be #portal in the case of ploneintranet, but also body (we could initialize it automatically on body, but I'd prefer to do it explicitly).
I don't see a way to automatically initialize the scroll detection logic because we cannot know which of the possible scrollable containers would be the one we are interested in.
Ref: #701
Current implementation: https://github.com/Patternslib/Patterns/blob/92bb8ab31ab68f51ddee1a8da0e406565f1b655d/src/core/scroll_detection.js