6645ffd4bd
This fixes a bug where if you cloned a Select2, the internal ID used for mapping elements (specifically the `<select>`) to the in-memory data store would be cloned as well, causing issues when you tried to initialize Select2 on the cloned element. This was because we did not properly clear all of the internal data and all of the internal attributes that Select2 uses when we destroyed it. The internal `data-select2-id` attribute was not being cleared, and this was the attribute being used for the internal mapping. Now we properly clear the `data-select2-id` attribute from the element when we call `RemoveData` on the element. This aligns with what we were trying to do, since we previously cleared out the internal store for that ID, and fixes the issue we were seeing when cloning. Fixes #5247 |
||
---|---|---|
.. | ||
data-tests.js | ||
decorator-tests.js | ||
escapeMarkup-tests.js |