Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

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

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants