diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 70a796ce5..ce90d2a96 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,5 +1,11 @@ ## RELEASE NOTES +### Version 2.4.1 - Oct 13, 2018 + +**Bug Fixes** + +- **Embed** - Embed will now correctly remove DOM metadata on `destroy` + ### Version 2.4.0 - Sep 17, 2018 > `2.4.0` includes a new component `placeholder`. To use this component in your existing SUI site, be sure to add `@placeholder: 'default';` to your `theme.config`. You can see an example in `theme.config.example` diff --git a/src/definitions/modules/embed.js b/src/definitions/modules/embed.js index 682a6ec23..a9f684def 100644 --- a/src/definitions/modules/embed.js +++ b/src/definitions/modules/embed.js @@ -10,7 +10,7 @@ ;(function ($, window, document, undefined) { -'use strict'; +"use strict"; window = (typeof window != 'undefined' && window.Math == Math) ? window @@ -181,6 +181,7 @@ $.fn.embed = function(parameters) { // clears embed reset: function() { module.debug('Clearing embed and showing placeholder'); + module.remove.data(); module.remove.active(); module.remove.embed(); module.showPlaceholder(); @@ -300,6 +301,15 @@ $.fn.embed = function(parameters) { }, remove: { + data: function() { + $module + .removeData(metadata.id) + .removeData(metadata.icon) + .removeData(metadata.placeholder) + .removeData(metadata.source) + .removeData(metadata.url) + ; + }, active: function() { $module.removeClass(className.active); },