title: cursor jump to top when writing inside textarea with tinymce angular2
body: <p>I use tinymce in my angular2 project, and I have a problem. The Cursor back to the top when I'm writing and sometimes it's erase a part of the text. How can I resolve this problem ?</p>
  
  <p>I use tinymce 4.53 and angular 2.1</p>
  
  <p>my tinymce components</p>
  
  <pre><code>declare var tinymce: any;
  
  @Component({
    selector: 'simple-tiny',
    template: `&lt;textarea id="{{elementId}}"&gt;&lt;/textarea&gt;`
  })
  export class SimpleTinyComponent implements AfterViewInit, OnDestroy {
  
    @Input() elementId: string;
    @Input() profile: string;
    @Input() content: string;
    @Output() onEditorChange = new EventEmitter&lt;any&gt;();
    @Output() onEditorKeyup = new EventEmitter&lt;any&gt;();
  
  
    public editor;
    public profiles: Object = {
      // Used by the shop global settings component
      simple1: {
        menubar: false,
        plugins: ['autoresize', 'link', 'paste'],
        toolbar: 'bold italic underline removeformat | link unlink | bullist numlist indent outdent',
        autoresize_min_height: 150,
        autoresize_bottom_margin: 20
      },
      simple2: {
        menubar: false,
        plugins: ['autoresize', 'link', 'paste'],
        toolbar: 'bold italic underline removeformat | link unlink | bullist numlist indent outdent',
        autoresize_min_height: 150,
        autoresize_bottom_margin: 20
      }
    }
  
    constructor(private helpersService:HelpersService) {}
  
    ngAfterViewInit() {
      tinymce.init(_.defaults({}, this.profiles[this.profile], {
        selector: '#' + this.elementId,
        plugins: ['link', 'paste', 'table'],
        elementpath: false,
        paste_as_text: true,
        skin_url: '/assets/skins/lightgray',
        setup: editor =&gt; {
          this.editor = editor;
          editor.on('keyup', () =&gt; {
            const content = editor.getContent();
            this.onEditorKeyup.emit(content);
          });
          editor.on('change', () =&gt; {
            this.onEditorChange.next(editor.getContent());
          });
          editor.on('init', () =&gt; {
            this.editor.setContent(this.content);
          });
        },
      }));
  
  
    }
  
    ngOnChanges() {
      if (this.editor) {
        this.editor.setContent(this.content);
      }
    }
  
    ngOnDestroy() {
      tinymce.remove(this.editor);
    }
  
  }
  </code></pre>
  
  <p>and html </p>
  
  <pre><code>&lt;simple-tiny [elementId]="'freeHours'" [profile]="'simple1'" [content]="contentFreeHours"  (onEditorChange)="contentFreeHours=$event"&gt;
                      &lt;/simple-tiny&gt;
  </code></pre>