bendavis78 / paper-time-picker

Material design time picker component for polymer
http://bendavis78.github.io/paper-time-picker/
MIT License
89 stars 63 forks source link

Not working in IE11 #31

Closed salanford closed 8 years ago

salanford commented 8 years ago

paper-time-picker does not work in IE11 at all and shows the error "Unable to get property 'add' of undefined or null reference". To reproduce just run your basic Plunker test page (http://plnkr.co/edit/gVQluG0GrFP3RzCPZPIi) in IE11.

kpprogrammer commented 8 years ago

I am running into this issue as well. SVG classList is not supported in IE, only className. Because of this error, my page won't even render. If fails in paper-clock-selector here: function create(type, classList) { var el = document.createElementNS(SVG_NS, type); if (classList) { classList.forEach(function(c) { el.classList.add(c); }); } if (!Polymer.Settings.useNativeShadow) { el.classList.add('style-scope'); el.classList.add('paper-clock-selector'); } return el; } and here: this.$.clock.classList.remove('animating');...

urbanjaklin commented 7 years ago

It seems that this error is still persistent in IE11! I'm not able to load the paper-time-picker and get the following errors: ie11paper-time-picker

mgibas commented 7 years ago

Same here -do we have workaround for this ? From a quick research this line throws:

if (classList) {
  classList.forEach(function(c) {
    el.classList.add(c); //el.classList is undefined
  });
}
mgibas commented 7 years ago

So, it seems that IE11 does not support classList for SVG :( Had to add this polyfill: https://github.com/beck/classlist-polyfill

its a fork with special fix for IE11.