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

.RemoveData() in colorpicker destroy doesn't remove the color data #319

Closed keertisomu closed 3 years ago

keertisomu commented 4 years ago

Description

As per jquery documentation "As of jQuery 1.7, when called with an array of keys or a string of space-separated keys, .removeData() deletes the value of each key in that array or string." , In colorpicker.js line 255 , .removeData('colorpicker','color') will not remove the value for the second key 'color' Can you please confirm this.

Context

Expected behavior

To remove the values of both the keys use either of the below formats as suggested by Jquery

Actual behavior

removes value only for first key = 'colorpicker'

Live Example

https://jsfiddle.net/ksomasundaram/boc5rwy2/