Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with closing notes. Closes #1109 #1112

Merged
merged 2 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
});

}));