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

Fix: disable skrollr on sm/xs viewport sizes #13

Merged
merged 6 commits into from
Feb 10, 2015

Conversation

jamesjwarren
Copy link
Member

Skrollr causes some issues on mobile. It is recommended to use id=skrollr-body on the scrollable element, skrollr then disabled native scrolling and uses css transforms. However as our menu and projects overlay are position: fixed this causes issues. The position: fixed elements can be set outside the skrollr-body however they are still not scrollable, as skrollr disables native scrolling on mobile (in favour of a css transforms method).

As we aren't actually using skrollr on mobile/tablet at the moment anyway (atm it is used only for the soon logo in desktop view) I have disabled skrollr initialisation if the viewport is smaller than 1024.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.24%) to 62.02% when pulling b56a722 on feature/fix-noscroll-mobile into 93bf1ed on develop.

snSkrollr.init();
if ($window.innerWidth > 1023) {
snSkrollr.init();
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i think you should disable it for mobile, maybe link this logic to the ResizeService? But I don't know if skrollr has a function to disable and renable itself

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it has skrollr.destory() so linking with the ResizeService could work.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.04% when pulling 659bfe1 on feature/fix-noscroll-mobile into a3756bd on develop.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.04% when pulling f41a6ae on feature/fix-noscroll-mobile into a3756bd on develop.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.04% when pulling 62f228a on feature/fix-noscroll-mobile into a3756bd on develop.

@edoparearyee
Copy link
Collaborator

👍

jamesjwarren added a commit that referenced this pull request Feb 10, 2015
Fix: disable skrollr on sm/xs viewport sizes
@jamesjwarren jamesjwarren merged commit d587028 into develop Feb 10, 2015
@jamesjwarren jamesjwarren deleted the feature/fix-noscroll-mobile branch February 11, 2015 14:02
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

3 participants