anselmh / object-fit

Polyfill (mostly IE) for CSS object-fit property to fill-in/fit-in images into containers.
MIT License
996 stars 93 forks source link

The demo included does not work on Firefox 34.0.5 #17

Closed petripottonen closed 9 years ago

petripottonen commented 9 years ago

I downloaded the zip, and it seems like the polyfill doesn't get activated for Firefox. screenshot 2014-12-17 12 21 22

petripottonen commented 9 years ago

I tested the demo site inluded (contain-version) on IE8, IE9, IE10, IE11. It fails on IE9, but works on all other IE versions.

The new modernizr version supports detection for object-fit. Would it be for example possible to use that for detection and the clearly well functioning solution for polyfill that's here..?

petripottonen commented 9 years ago

IE9: screenshot 2014-12-17 12 57 00

anselmh commented 9 years ago

Hey, actually I included the Modernizr test for it in the codebase. Polyfill won’t be applied / executed if there’s native support.

For the other issues I’ll try to replicate the errors and will get back to you. Thanks for reporting.

petripottonen commented 9 years ago

No problem. And thank you for the project which I’ll certainly will be using!

-Petri

On 17 Dec 2014, at 13:02, Anselm Hannemann notifications@github.com wrote:

Hey, actually I included the Modernizr test for it in the codebase. Polyfill won’t be applied / executed if there’s native support.

For the other issues I’ll try to replicate the errors and will get back to you. Thanks for reporting.

— Reply to this email directly or view it on GitHub https://github.com/anselmh/object-fit/issues/17#issuecomment-67307344.

anselmh commented 9 years ago

So in Firefox you probably get a "operation insecure" console error, don’t you? This is due to a restriction that applies to the CSS parser I use in here. I hopefully can get rid of it soon but for the time being external URLs are not supported (means opening from filesystem won’t either). Can you confirm this and does it work using a real webserver (local should be fine)?

IE9 seems a different issue though.

petripottonen commented 9 years ago

Indeed the Firefox works when I use a local MAMP-server. Great stuff!

petripottonen commented 9 years ago

Oh, might have spoken too soon. Is there any way to go around the restriction? I'm using MAMP, Virtualhost X and Codekit, and somehow Codekit (although there is a server) gets the same errors and makes development almost impossible...

So is there any way to (at least temporarily) go around the "operation insecure" -error?

anselmh commented 9 years ago

You might give a try setting a proper CSP (Content Security Policy) rule on the server that allows cross-site scripts etc to make it work.

Otherwise I don’t know of any way to circumvent it, sorry. I will open another ticket for a refactoring task of the in-target CSS parser but this will likely take some more time.

anselmh commented 9 years ago

Closing this now as initial bug isn’t reproducible and IE bug has its own issue.