Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBoundingClientRect not implemented on iOS 3.0 #71

Closed
clark-pan opened this issue Jun 1, 2012 · 2 comments
Closed

getBoundingClientRect not implemented on iOS 3.0 #71

clark-pan opened this issue Jun 1, 2012 · 2 comments

Comments

@clark-pan
Copy link

getBoundingClientRect is currently only being used to calculate the container width.

The method doesn't exist on iOS 3.0, which iphone 3gs are bundled with.

Is there any reason why another method isn't used? (ie clientWidth?)

@Bubbi
Copy link

Bubbi commented Jun 8, 2012

It could be nice to have an updated version, where this were fixed.
I found an article, that might be useful for a workaround:
http://help.dottoro.com/ljvmcrrn.php

Here they show how to achieve it with some small workarounds for older browsers. It could be great to have that implemented. Especially because a lot still use iPhone 3.

@clark-pan
Copy link
Author

It seems to have been fixed in swipe2 by defaulting to clientWidth if getBoundingClientRect is unavailable, so thats how i updated my copy of the code.

Since we're only using the width property of the element anyways, why use getBoundingClientRect at all? The performance on this method is pretty attrocious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants