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

Typeerror #32

Closed
vincecarney opened this issue Jul 13, 2016 · 3 comments
Closed

Typeerror #32

vincecarney opened this issue Jul 13, 2016 · 3 comments

Comments

@vincecarney
Copy link

@vincecarney vincecarney commented Jul 13, 2016

Page loads and after script runs, image disappears.

Console error - ofi.browser.js:
Typeerror: attempting to change access mechanism for an unconfigurable property

Ipad Mini 2
OS: iOS v7
Browser: Safari

@vincecarney

This comment has been minimized.

Copy link
Author

@vincecarney vincecarney commented Jul 13, 2016

I'm able to replicate the image disappearing on the following devices:

Ipad 4 - iOS v7 - Safari
Ipad Air - iOS v7 - Safari
iPhone 5s - iOS v7 - Safari
iPhone 5 - iOS v6 - Safari
Windows 8.1 - Safari 5.1

Any thoughts?

@fregante

This comment has been minimized.

Copy link
Owner

@fregante fregante commented Jul 14, 2016

Yes, it's not compatible with iOS 7

I can add compatibility but you won't be able to change or read the src property

@fregante fregante closed this Jul 14, 2016
@fregante

This comment has been minimized.

Copy link
Owner

@fregante fregante commented Aug 5, 2016

This is now fixed, the polyfill is applied correctly but you won't be able to read the correct src value via javascript. For example:

<img src="image.jpg">
objectFitImages();
console.log(document.querySelector('img').src);
// in semi-modern browsers: http://example.com/image.jpg
// in iOS7: data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==

ios 7 screenshot

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.