mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-30 22:21:16 -04:00
Deal with elements no longer in the DOM
Instead of keeping references to nodes detached from the DOM, remove them from the store. Likewise, add node appended to the DOM. This includes code to 'clean' DOM nodes when removed. This is important because nodes can retain classes and styles. If they are re-attached in future this can cause problems with how the state of the element is determined.
This commit is contained in:
@@ -13,9 +13,7 @@
|
||||
this.$stickyBottom = this.$form.find('#sticky_template_forms');
|
||||
|
||||
this.$stickyBottom.append(this.nothingSelectedButtons);
|
||||
GOVUK.stickAtBottomWhenScrolling.add(this.nothingSelectedButtons, true);
|
||||
this.$stickyBottom.append(this.itemsSelectedButtons);
|
||||
GOVUK.stickAtBottomWhenScrolling.add(this.itemsSelectedButtons, true);
|
||||
|
||||
// all the diff states that we want to show or hide
|
||||
this.states = [
|
||||
|
||||
Reference in New Issue
Block a user