Open ElliottRoche opened 8 years ago
Are you destroying redactor on view change? This should cleanup the DOM.
Not manually no.
I was under the impression that this part of angular-redactor.js would destroy it if it was loaded again.
$timeout(function() {
editor = element.redactor(options);
ngModel.$render();
element.on('remove',function(){
element.off('remove');
element.redactor('core.destroy');
});
});
I'm unsure where/why this error is happening and it may be unrelated to angular-redactor but I'm not sure where else to start.
When I'm in an application state that has redactor in the view and I navigate away from that state to a different part of the app, the redactor-toolbar-tooltip remains in the DOM. It's got a style attribute of 'display: none;' so it doesn't actually remain visible, but it persists nonetheless.
If I go back to that state with redactor in the view (or to any state with redactor for that matter) it sticks another set of redactor-toolbar-tooltips into the DOM.
So if the app isn't refreshed for sometime, there could a huge number of these tooltips still stuck in the DOM.
Here's an example:
Any idea why this might be happening?