disabling formgroup with tinymce in material tab gives 'node cannot be null or undefined' bug.

Aperta
#167 11 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
angular, typescript
Ambito
frontend

Direzione di ricerca

Start by reproducing the issue with @tinymce/tinymce-angular 3.5.0, TinyMCE 5.2.0, the provided editor template, defaultConfig, and _disableFormsDuringProgress method in a Material tab with a reactive form. Trace the editor lifecycle while switching tabs and toggling emailForm.disable()/enable(); done means disabling the form group causes no null-node error or unintended dirty state and the other controls are visibly disabled.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

GitHub status: escalated

What is the current behavior?
I am using my tinymce editor with form-group reactive forms. As per the standard functional flow in my component there is a global Redux state for progress bar with boolean value which gets set in HTTP interceptor accordingly. I subscribe to it and disable the form group when progress bar (means API call is in progress) is true and enable it when set to false. This piece of functionality have created subtle multiple bugs in my component. Getting 'node cannot be null or undefined' error, form-group with tinymce getting dirty automatically when changing tab, other form fields in form-group also not getting disabled in UI.

What is the expected behavior?

Expected behavior was to disable a whole formgroup without any repercussions.

Which versions of TinyMCE/TinyMCE-Angular, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE or TinyMCE-Angular?

I am using version "@tinymce/tinymce-angular": "^3.5.0" and "tinymce": "^5.2.0"

below is my code:

<editor formControlName="inputEditor" [init]="defaultConfig"></editor>

private _disableFormsDuringProgress() { this.progressBar$.subscribe(res => { if (res) { this.emailForm.disable(); } else { this.emailForm.enable(); } }); }

public defaultConfig: any = { height: 700, base_url: '/tinymce', // Root for resources suffix: '.min', plugins: [ 'advlist autolink link image lists charmap print hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking', 'table emoticons template paste help' ], browser_spellcheck: true, toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify |' + ' bullist numlist outdent indent | link image | print media fullpage | ' + 'forecolor backcolor emoticons | help', menubar: 'file edit view insert format tools table help', branding: false, setup: (editor: any) => { this.editor = editor; this.editor.on('init', () => { this.editorLoaded = true; }); } };

Lingua principale
TypeScript
Stelle
346
Fork
94
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinymce/tinymce-angular

Tutte le issue di tinymce/tinymce-angular

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.