Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

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

Closed
keertisomu opened this issue Aug 31, 2020 · 0 comments
Closed

Comments

@keertisomu
Copy link

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

  • bootstrap-colorpicker version: v2.5.2
  • bootstrap version: v2.2.2
  • jQuery version: v2.2.4
  • Browser name and version: Chrome , v84.0.4147.135
  • Operative System name an version: Windows 10

Expected behavior

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

  • this.element.removeData(['colorpicker' , 'color'])...
  • this.element.removeData('colorpicker' 'color')...

Actual behavior

removes value only for first key = 'colorpicker'

Live Example

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

@itsjavi itsjavi changed the title Clarification with .RemoveData() in colorpicker destroy .RemoveData() in colorpicker destroy doesn't remove the color data Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants