fix css in touch-overflow example #3165

Merged
merged 1 commit into from Nov 25, 2011

Conversation

Projects
None yet
2 participants
@MaZderMind
Contributor

MaZderMind commented Nov 25, 2011

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

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Nov 25, 2011

Contributor

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

Contributor

toddparker commented Nov 25, 2011

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

@MaZderMind

This comment has been minimized.

Show comment
Hide comment
@MaZderMind

MaZderMind Nov 25, 2011

Contributor

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)

Contributor

MaZderMind commented Nov 25, 2011

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

Merge pull request #3165 from MaZderMind/fix-touchOverflow-with-lists
fix css in touch-overflow example. Thanks MaZderMind!

@toddparker toddparker merged commit f8dcaa2 into jquery:master Nov 25, 2011

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Nov 25, 2011

Contributor

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

Contributor

toddparker commented Nov 25, 2011

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

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