Feature: enable scroll syncing when browsers are at different breakpoints... #750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I recently noticed problem with scroll sync on this project.
The combination of
window
never scrolling at all (you scroll other elements) and a fixed header on smaller screens meant there was literally zero scroll syncing :(This prompted me to implement a feature that's been often requested elsewhere - the ability to sync the scroll position of any element in addition to window. So far so good, so it seemed - until I realised that at different breakpoints, the element that is actually scrolling in this project switches between
main
and.mdl-layout
.This renders the usual event-capturing techniques useless as a mobile broadcaster may report a scroll position from 1 element, but desktop receivers don't know what to do with the data (as they are scrolling a separate element)
This has lead to what I believe to both a unique and amazing feature of Browsersync. Given
x
amount of elements, scroll position will be synced between them. Basically allows http://quick.as/996hpq2l