Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

fix css in touch-overflow example#3165

Merged
toddparker merged 1 commit intojquery-archive:masterfrom
MaZderMind:fix-touchOverflow-with-lists
Nov 25, 2011
Merged

fix css in touch-overflow example#3165
toddparker merged 1 commit intojquery-archive:masterfrom
MaZderMind:fix-touchOverflow-with-lists

Conversation

@MaZderMind
Copy link
Contributor

Hi

This fixes a bug with lists not beeing fit into the viewport width anymore when using touchOverflowEnabled on iOS5.

With 1.0 it looks like this:
http://mazdermind.de/temp/jqmobile/touch-overflow/with-1.0.html
http://mazdermind.de/temp/jqmobile/touch-overflow/with-1.0.png (iPhone 4s)

With this pull it looks like this:
http://mazdermind.de/temp/jqmobile/touch-overflow/with-fix.html
http://mazdermind.de/temp/jqmobile/touch-overflow/with-fix.png (iPhone 4s)

Possibly this fixes #2744, too.

Regards,
Peter

@toddparker
Copy link
Contributor

Looks good, but I'm curious why setting left and right to 0 works. Do you know?

@MaZderMind
Copy link
Contributor Author

The scrollable Element is set to position:absolute. Absolute positioned block elements don't constrain their width to the parent. Setting left/right makes it constrain to the body-element which is in our case identical to the viewport.

I just found another issue with the top-position of not-inset lists. I'll push a fix for that, too, soon.

Am 25.11.2011 um 17:44 schrieb Todd Parker reply@reply.github.com:

Looks good, but I'm curious why setting left and right to 0 works. Do you know?


Reply to this email directly or view it on GitHub:
#3165 (comment)

toddparker added a commit that referenced this pull request Nov 25, 2011
fix css in touch-overflow example. Thanks MaZderMind!
@toddparker toddparker merged commit f8dcaa2 into jquery-archive:master Nov 25, 2011
@toddparker
Copy link
Contributor

Gotcha. We appreciate the help, keep 'em coming.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS5/touchOverflowEnabled layout problems

2 participants