themyth92 / angular2-lightbox

Lightbox2 port to use with angular2
MIT License
32 stars 18 forks source link

Not working in IE #20

Closed skype007 closed 6 years ago

skype007 commented 7 years ago

Hi,

I don't know if it's a known problem and if there's already a fix for that but if you tried to run the demo on Chrome : it works :D (the image is indeed displaying). But in Internet Explorer, the image is not displaying :(

I'm working in a project with Angular4 FYI.

Best regards, skype007

themyth92 commented 7 years ago

Which IE version have you tried ?

skype007 commented 7 years ago

I tried on IE11.

Just in case, here are the polyfills I imported for IE (in polyfills.ts) : / IE9, IE10 and IE11 requires all of the following polyfills. / import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; import 'core-js/es6/math'; import 'core-js/es6/string'; import 'core-js/es6/date'; import 'core-js/es6/array'; import 'core-js/es6/regexp'; import 'core-js/es6/map'; import 'core-js/es6/set'; / Evergreen browsers require these. / import 'core-js/es6/reflect'; import 'core-js/es7/reflect';

themyth92 commented 7 years ago

Ok tks, actually I have not tried using this with IE. Will give it a try and I will try to make it work on IE11 and above. Tks for reporting !

skype007 commented 7 years ago

Alright thank you ;) For the time being, I'm using lightbox2 although I'd prefer your library because it's more "angular-friendly". Thank you again for your work :)

anupkattel commented 6 years ago

I'm having the same issue. It breaks in lightbox.component.ts in _sizeContainer() method. The IE doesn't seem to support the transition. Therefore, _postResize() method doesn't get called at all. I don't know a good fix but my current work-around is to call _postResize method after a second or two using setTimeout() to ensure it gets called in IE.

Do you guys have any thoughts?

themyth92 commented 6 years ago

I guess the call back of those transitionend not being called for some reason. PR welcome if u know how to fix it.

anupkattel commented 6 years ago

Hi mate, I've sent the pull request. Apparently, it was some CSS properties for the transition and animation that caused this issue.

themyth92 commented 6 years ago

Hi, tks for your help. Really appreciate it. Have you tested on IE 10 and 11, work fine ? Cuz I dont use windows.

anupkattel commented 6 years ago

I've tested it on IE 11 and it works fine. Although I haven't tested this in IE 10, animation-duration and transition-duration are said to be supported in IE 10.0 and above in w3schools. So, it should be fine.

anupkattel commented 6 years ago

@themyth92 Can you please create a new release (in npm)? @skype007 Are you able to check the fix after the new release is made? Just so this issue can be closed.

skype007 commented 6 years ago

Well if https://themyth92.com/project/angular2-lightbox/ is up to date, then I confirm it now works on IE11 ;) I think it can be closed (if it works on IE11, there's no reason it cannot work in IE10).

Good job ;-D