You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That all worked fine and dandy but then I was running into an issue where it was very difficult to remove the event listeners. To resolve this, I added the following to client.js:
/**
Destroys the old listeners and allows me to refresh new ones.
*/
this.destroy = function(){
This allows me to do a hard reset of siofu when I load a new page or new content by calling it from the template when it is being unloaded. This also resolved an issue where if I did several edits on a page (moved another image to the upload spot) both would appear (in my case, I only want one).
The text was updated successfully, but these errors were encountered:
That all worked fine and dandy but then I was running into an issue where it was very difficult to remove the event listeners. To resolve this, I added the following to client.js:
/**
*/
this.destroy = function(){
callbacks = {};
uploadedFiles = [];
readyCallbacks = [];
}
This allows me to do a hard reset of siofu when I load a new page or new content by calling it from the template when it is being unloaded. This also resolved an issue where if I did several edits on a page (moved another image to the upload spot) both would appear (in my case, I only want one).
The text was updated successfully, but these errors were encountered: