Skip to content

Commit ead8dc4

Browse files
committed
Update angular-redactor.js
My fix is to add a remove listener and before it's removed calling the destroy function. This will remove all tooltips from the body and release the redactor properly.
1 parent d794a82 commit ead8dc4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

angular-redactor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
$timeout(function() {
5555
editor = $_element.redactor(options);
5656
ngModel.$render();
57+
element.on('remove',function(){
58+
element.off('remove');
59+
element.redactor('core.destroy');
60+
});
5761
});
5862

5963
ngModel.$render = function() {

0 commit comments

Comments
 (0)