This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " angular-ui-tinymce" ,
3
- "version" : " 0.0.18 " ,
3
+ "version" : " 0.0.19 " ,
4
4
"descriptin" : " This directive allows you to add a tinymce to your form elements." ,
5
5
"author" : " https://github.com/angular-ui/ui-tinymce/graphs/contributors" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ angular.module('ui.tinymce', [])
179
179
// This block is because of TinyMCE not playing well with removal and
180
180
// recreation of instances, requiring instances to have different
181
181
// selectors in order to render new instances properly
182
- scope . $on ( '$tinymce:refresh' , function ( e , id ) {
182
+ var unbindEventListener = scope . $on ( '$tinymce:refresh' , function ( e , id ) {
183
183
var eid = attrs . id ;
184
184
if ( angular . isUndefined ( id ) || id === eid ) {
185
185
var parentElement = element . parent ( ) ;
@@ -189,6 +189,7 @@ angular.module('ui.tinymce', [])
189
189
clonedElement . removeAttr ( 'aria-hidden' ) ;
190
190
tinymce . execCommand ( 'mceRemoveEditor' , false , eid ) ;
191
191
parentElement . append ( $compile ( clonedElement ) ( scope ) ) ;
192
+ unbindEventListener ( ) ;
192
193
}
193
194
} ) ;
194
195
You can’t perform that action at this time.
0 commit comments