itsjavi / bootstrap-colorpicker

Bootstrap Colorpicker is a modular color picker plugin for Bootstrap.
https://itsjavi.com/bootstrap-colorpicker/
MIT License
1.38k stars 367 forks source link

Error in IE11: Object doesn't support property or method 'assign' #250

Closed MedusaDelft closed 6 years ago

MedusaDelft commented 6 years ago

Description

Error in IE11: Object doesn't support property or method 'assign'. File: bootstrap-colorpicker.min.js (9,7162)

Same code runs fine in Firefox and Chrome. Edge not tested yet.

Context

Expected behavior

Clicking button shows dialog (modal) with a form-entry with the colorpicker.

Actual behavior

Clicking button does not work (javascript error)

Live Example

{Please write here a link to your JsFiddle example}

itsjavi commented 6 years ago

Hello @MedusaDelft this is due to IE11 not compatible with the EcmaScript version having Object.assign you may need a ES6 shim for that https://stackoverflow.com/questions/35215360/getting-error-object-doesnt-support-property-or-method-assign

ps: Thanks for your complete issue description, very appreciated.

MedusaDelft commented 6 years ago

Ok, thank you for the info. I had not realised this. Getting another error now, so I think I have to look for a different picker unfortunately.

itsjavi commented 6 years ago

Ok, anyway you can try a ES6 shim for IE as said or try to use a version previous to 3.0 of this plugin, which should be using a less modern javascript

Herst commented 6 years ago

Getting another error now, so I think I have to look for a different picker unfortunately.

I haven't encountered any such issues after applying the Object.assign shim.

MedusaDelft commented 6 years ago

@Herst I got an error with the toRgbString function