jakiestfu / Snap.js

A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)
http://jakiestfu.github.io/Snap.js/
5.99k stars 663 forks source link

Snap.js iPhone Address bar tap #64

Open nberenbold opened 11 years ago

nberenbold commented 11 years ago

Hey,

normally if you tap on the addressbar or the clock bar on the top of the screen the content of the page scrolls back to top. if you use snap.js this feature is disabled, perhaps a bug or a feature.

jakiestfu commented 11 years ago

I believe tapping the top to scroll up only works on the body/html elements. The iPhone would have no way of knowing what the scrollable content area is if done in a different element.

schmolzp commented 11 years ago

It's the -webkit-overflow-scrolling:touch that disables the scroll to top This might help: http://stackoverflow.com/questions/8970740/ios-safari-scroll-to-top-does-not-work-on-certain-pages-why

szalishchuk commented 11 years ago

I agree with @schmolzp

Here is another stackoverflow thread, which refers to this issue. Hopefully it will get fixed in iOS7.

You should probably close this issue.

vinhtq commented 10 years ago

I have the same problem! But i think Apple will not fix that soon! I try to change the code in snap.css like this:

.snap-content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; z-index: 2; /overflow: auto;/ -webkit-overflow-scrolling: touch; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); -o-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }

.snap-drawer { position: absolute; top: 0; right: auto; bottom: 0; left: auto; width: 265px; height: auto; overflow: auto; /-webkit-overflow-scrolling: touch;/ -webkit-transition: width 0.3s ease; -moz-transition: width 0.3s ease; -ms-transition: width 0.3s ease; -o-transition: width 0.3s ease; transition: width 0.3s ease; }

It will fix the problem, but i have another problem is when you scroll down the left panel page you will have extra space down it!

adyz commented 10 years ago

Hi

The -webkit-overflow-scrolling: touch works now is iOS7, but since the content has the absolute position, the top bar tap is still now working. Din anybody found any solution for this

vanderlin commented 9 years ago

Any word on this bug - I am still having it.