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

CSS2Properties doesn't have an indexed property setter in FF (28) #5

Closed ok-sure closed 10 years ago

ok-sure commented 10 years ago

Getting the following error in Firefox on my implementation and your test files: I'm seeing:

Timestamp: 19/02/2014 11:39:33
Error: Error: Permission denied to access property 'mediaText'
Source File: http://comeround.bbpdev.com/__dev/all/object-fit/dist/polyfill.object-fit.js
Line: 32

Timestamp: 19/02/2014 11:39:56
Error: TypeError: CSS2Properties doesn't have an indexed property setter.
Source File: http://comeround.bbpdev.com/__dev/all/object-fit/dist/polyfill.object-fit.js
Line: 396
anselmh commented 10 years ago

Any chance you can track down what part of the code exactly causes this error?

ok-sure commented 10 years ago

It's line 38 where it's returning the cssRules. Though I can't get it to show me anything useful about the data it's storing up here by using the console.log so maybe it's returning null?

anselmh commented 10 years ago

Hi @mattbbp, it seems to be a problem with testing on a local machine path instead of a server (you test on file:///, aren't you? Can you please test if this also happens on a localhost or a server? Couldn't reproduce here…

ok-sure commented 10 years ago

http://comeround.bbpdev.com/__dev/all/object-fit/tests/index-cover.html Getting the same here...

anselmh commented 10 years ago

Weird, I'm not getting this in FF 27.0 and 30alpha. Which channel do you use – is it Aurora?

ok-sure commented 10 years ago

I'm on the beta channel on my Mac - I've tried it on 2 real PCs (v26 & v27) and and a virtual Mac (v27) While I'm not getting the same error on the PCs, it's distorting the image/not rendering the cover object-fit properly.

anselmh commented 10 years ago

Thanks, I'll try to find out what it could be and how to fix it.

ok-sure commented 10 years ago

The PCs don't have the developer tools installed to see the full errors. but these warnings are showing in Firebug on load (Windows 8, FF27):

14:20:44.963 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. index-cover.html

14:20:45.043 TypeError: CSS2Properties doesn't have an indexed property setter. polyfill.object-fit.js:396

ok-sure commented 10 years ago

any joy on this at all?

anselmh commented 10 years ago

Oh, sorry—hadn't had the time yet to dig into this issue. I can confirm the second warnings btw while I still cannot confirm the initially reported issue. Can you reconfirm and update the initial post accordingly?

ok-sure commented 10 years ago

no - I'm not getting that error now. that's so weird. have updated the post.

fsimmons commented 10 years ago

Just to confirm... getting same error. "TypeError: CSS2Properties doesn't have an indexed property setter." line 396

anselmh commented 10 years ago

Thanks, @Schepp is working on this and we’ll keep you up-to-date here.

fsimmons commented 10 years ago

Thanks!

Triphys commented 10 years ago

Just to confirm as well, same issue here :)

anselmh commented 10 years ago

Thanks and sorry for the delay. I haven’t found an easy solution yet but will work on it over the next days and hopefully get a solution.

Triphys commented 10 years ago

Looking forward to it, keep up the great work :)

ok-sure commented 10 years ago

Thank you! Matt

On Fri, Mar 14, 2014 at 1:34 PM, Triphys notifications@github.com wrote:

Looking forward to it, keep up the great work :)

Reply to this email directly or view it on GitHubhttps://github.com/anselmh/object-fit/issues/5#issuecomment-37646922 .

anselmh commented 10 years ago

Hi, sorry again for the long delay here. I reached out to some FF devs but got no clear answer yet to this issue. Therefore I want to propose a hotfix to you:

By commenting out line 396 from polyfill.object-fit.js you can prevent the error and Firefox will display the image correctly with object-fit.

I still hope we’ll get the issue tracked down and resolved as soon as possible.

OliverJAsh commented 10 years ago

I’m looking at http://comeround.bbpdev.com/__dev/all/object-fit/tests/index-cover.html in FF 29 and it looks good to me!

ok-sure commented 10 years ago

Yes - I can't get it to work in practice on a larger site though. https://comeround.bbpdev.com/__dev/mph/ I've put it back in to show the problem, it just hangs on every image it needs to process. Is it too much css because of bootstrap? Is it trying to process all that for every image?

On 22 May 2014 21:02, Oliver Joseph Ash notifications@github.com wrote:

I’m looking at http://comeround.bbpdev.com/__dev/all/object-fit/tests/index-cover.htmlin FF 29 and it looks good to me!

— Reply to this email directly or view it on GitHubhttps://github.com/anselmh/object-fit/issues/5#issuecomment-43937065 .

anselmh commented 10 years ago

I see. I don’t know yet why the script goes unresponsive in this case (only in Firefox as Chrome supports object-fit natively). I’ll have a look at this as soon as possible and make a performance audit.

ok-sure commented 10 years ago

Thank you - this site is due to go live in a week so if I can get this bit worked out, it would be great.

On 23 May 2014 23:35, Anselm Hannemann notifications@github.com wrote:

I see. I don’t know yet why the script goes unresponsive in this case (only in Firefox as Chrome supports object-fit natively). I’ll have a look at this as soon as possible and make a performance audit.

— Reply to this email directly or view it on GitHubhttps://github.com/anselmh/object-fit/issues/5#issuecomment-44067439 .

anselmh commented 10 years ago

Hi @mattbbp @OliverJAsh @Triphys can you please test v0.3.3 and report back if the issue still appears or not. @mattbbp your issue seems to be a different, would you mind creating a new one mentioning the performance issue (if still applicable in v0.3.3)?