Skip to content

Commit

Permalink
Merge pull request #1112 from sandialabs/alex-bugfix
Browse files Browse the repository at this point in the history
Fixing issue with closing notes. Closes #1109
  • Loading branch information
Mletter1 committed May 24, 2023
2 parents 536a8ae + 114c8bb commit 27b575a
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions web-server/plugins/slycat-parameter-image/js/stickies.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,19 @@
this.uiStickyCloseButton = $('<i title="Close">')
.addClass("fa fa-close float-right")
.appendTo(this.uiStickyHeader);
// End Slycat changing format of Close button
// End Slycat modification

this._on( this.uiStickyCloseButton, {
"click": function() {
this._destroy();
"click": function(e) {
// Slycat disabling _destroy custom, widget-specific, cleanup because this is
// causing a "maximum call stack size exceeded" error. Instead, we are calling
// this.uiSticky.remove() here and then calling this.destroy() to remove the
// widget functionality completely.

// this._destroy();
this.uiSticky.remove();
this.destroy();
// End Slycat modification
}
});
},
Expand Down Expand Up @@ -122,9 +130,13 @@
}

},
_destroy: function() {
this.uiSticky.remove();
}
// Slycat disabling _destroy custom, widget-specific, cleanup because this is
// causing a "maximum call stack size exceeded" error. Instead, we are calling
// this.uiSticky.remove() in the _createCloseButton function.
// _destroy: function() {
// this.uiSticky.remove();
// }
// End Slycat modification
});

}));

0 comments on commit 27b575a

Please sign in to comment.