/    Sign up×
Community /Pin to ProfileBookmark

iPhone (and sometimes Droid) – page jumps to left when device is turned

Subject says it all. In testing a new page specifically tailored to mobile devices, I’m seeing an odd behavior: when the device is rotated from portrait to landscape layout, all of the content on the page jumps to the left. This almost always happens on the iPhone, and I sometimes see it on the Droid as well.

Worth noting: I’m implementing the iScroll script, and I have viewport settings to not user resizable (width is device width, magnification is 1.0).

When tracking x postion (offsetLeft), everything comes up 0.

My questions really are:
1. Under what circumstances can this happen?
2. Is there a way to detect that that an element (any element, or a specific element) is outside the viewport? If I can do that, I wouldn’t be any the wiser as to what the heck’s going on… but I can at least fix the problem.

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@kiwibritOct 08.2010 — [url=http://www.engageinteractive.co.uk/blog/2008/06/19/tutorial-building-a-website-for-the-iphone/]Coding content for iPhone orientation change[/url]
×

Success!

Help @Engywook spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...