buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

IE8 not recognising colorpicker component #67

Closed matenji closed 9 years ago

matenji commented 9 years ago

IE8 doesn't like non-HTML5 custom tags:

template = ..... ' ... ' ... ' ... ' ... ..... sliderAlpha, sliderHue = colorpickerTemplate.find('colorpicker-hue'), sliderSaturation = colorpickerTemplate.find('colorpicker-saturation'), colorpickerPreview = colorpickerTemplate.find('colorpicker-preview'), pickerColorPointers = colorpickerTemplate.find('i');

If I change into

IE8 will be okay with it, however doing colorpickerTemplate.find('div.colorpicker-hue') will not return the correct object. Is there a way to rewrite the .find() method so that using instead of won't throw any errors in IE8?

matenji commented 9 years ago

Okay, I figured it out. I just renamed each tag into existing, unique ones (b, u, s, span), then changed those references in the CSS file as well.

buberdds commented 9 years ago

branch 1.0 if you need a functionality from the original plugin or IE<9 support

matenji commented 9 years ago

Hey, I looked at branch 1.0 and I'm not sure which part of the code is related to my issue that I should implement. Do I just use 1.0 and replace the current build with it or what?

PS: The rabbit trail goes down a long hole: even after I solved my own issue I'm still getting errors in IE8 related to some other stuff.

buberdds commented 9 years ago

Well you have to checkout branch 1.0 https://github.com/buberdds/angular-bootstrap-colorpicker/tree/1.0.0

This branch is using jquery and jquery plugin so it might work with IE8 but this branch is really old. To be honest I dont think you should use this color picker if you need to support old IE's.