Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: enable scroll syncing when browsers are at different breakpoints... #750

Merged
merged 1 commit into from Oct 1, 2015

Conversation

shakyShane
Copy link
Contributor

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

@addyosmani addyosmani self-assigned this Sep 3, 2015
addyosmani added a commit that referenced this pull request Oct 1, 2015
Feature: enable scroll syncing when browsers are at different breakpoints...
@addyosmani addyosmani merged commit 2e8523c into google:master Oct 1, 2015
@addyosmani
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants