Snap.js icon indicating copy to clipboard operation
Snap.js copied to clipboard

Phonegap , Annoying Horizontal Scroll

Open greatcrypter opened this issue 12 years ago • 16 comments

How to remove the horizontal scroll bar when snapper open left?

screen shot 2013-08-12 at 9 32 54 pm

greatcrypter avatar Aug 12 '13 13:08 greatcrypter

Try

body{
    overflow-x: hidden;
}

jakiestfu avatar Aug 12 '13 14:08 jakiestfu

Does not for me into Phonegap App running on Android. I got the same problem with your demo (http://jakiestfu.github.io/Snap.js/demo/apps/default.html) on mobile browser when swipe quickly only left panel... An idea?

dcolin avatar Jan 30 '14 20:01 dcolin

This is also happening for me. Happening both in my own app and in the demo. This needs to be reopened.

jayd3e avatar Mar 05 '14 09:03 jayd3e

Have you guys debugged what element is the wide one? Either setting the correct width of absolute elements or setting full positions (top:0, left:0, top: 0, bottom: 0) in conjunction with overflow-x should work. Let me know if you have any more information regarding this matter.

jakiestfu avatar Mar 05 '14 17:03 jakiestfu

So setting overflow: hidden on the drawer and content elements does the trick. You can also achieve roughly the same thing by setting position: fixed on both elements, then just having the content inside of each element scroll. The main reason I called for this to be reopened, is b/c the demo page is actually experiencing this bug, as shown below.

screenshot_2014-03-05-10-40-19

I'm interested in getting this library back up to speed brah. Maybe we can have a little hackathon this weekend?

jayd3e avatar Mar 05 '14 19:03 jayd3e

@jayd3e I've been wanting to work on it but I haven't got the time. Maybe we can do a hackathon this weekend;)

jakiestfu avatar Mar 05 '14 19:03 jakiestfu

Sounds good!

jayd3e avatar Mar 05 '14 19:03 jayd3e

Indeed position: fixed on both elements does the trick ! Thx guys

dcolin avatar Mar 26 '14 21:03 dcolin

I love you @jayd3e!

th0th avatar Apr 09 '14 22:04 th0th

I love you @jayd3e!

DimoStoyanov avatar Apr 29 '14 11:04 DimoStoyanov

This works for me:

.snap-content, .snap-drawers, .snap-drawer { overflow: hidden; }

position: fixed; by itself didn't work.

Thanks guys

mcneela86 avatar May 09 '14 05:05 mcneela86

I have tried all of things mentioned here and still have the issue. It doesnt happen everytime, only sometimes. I can see that the body is being extended well past the width of the screen. The drawers are still only the width of the screen, but the body (white color) extends much further, almost 3/4 of the screen width past the initial size.

jasonhr13 avatar May 22 '14 18:05 jasonhr13

mine worked with 'minPosition: 0'. that is asuming you didnt want to use the right menu.

mcneela86 avatar May 23 '14 21:05 mcneela86

Thanks, @jayd3e. Setting position: fixed solved it.

thiago-negri avatar Oct 17 '14 14:10 thiago-negri

I know the issue is old but I didn't find a full working answer to it in any open issue. Its not necessary to set position: fixed in any element. just by adding overflow: hidden; positon: relativein the body and overflow-x: hidden in .snap-drawer the problem was fixed in both iOS and Android

axul avatar Oct 03 '16 20:10 axul

Thanks, @jayd3e. position: fixed

Cdvalencia avatar Dec 31 '17 02:12 Cdvalencia