This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " angular-ui-tinymce" ,
3- "version" : " 0.0.18 " ,
3+ "version" : " 0.0.19 " ,
44 "descriptin" : " This directive allows you to add a tinymce to your form elements." ,
55 "author" : " https://github.com/angular-ui/ui-tinymce/graphs/contributors" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ angular.module('ui.tinymce', [])
179179 // This block is because of TinyMCE not playing well with removal and
180180 // recreation of instances, requiring instances to have different
181181 // 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 ) {
183183 var eid = attrs . id ;
184184 if ( angular . isUndefined ( id ) || id === eid ) {
185185 var parentElement = element . parent ( ) ;
@@ -189,6 +189,7 @@ angular.module('ui.tinymce', [])
189189 clonedElement . removeAttr ( 'aria-hidden' ) ;
190190 tinymce . execCommand ( 'mceRemoveEditor' , false , eid ) ;
191191 parentElement . append ( $compile ( clonedElement ) ( scope ) ) ;
192+ unbindEventListener ( ) ;
192193 }
193194 } ) ;
194195
You can’t perform that action at this time.
0 commit comments