disabling formgroup with tinymce in material tab gives 'node cannot be null or undefined' bug.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
- Domain
- frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
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;
});
}
};
- Dominant language
- TypeScript
- Stars
- 346
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tinymce/tinymce-angular
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
tinymce/tinymce-angular#425 · 4 comments ·
-
Excessive nested span tags generated when repeatedly copy-pasting text with white background color Openneeds: more info
Difficulty 4/5 3-5 days Newbie friendliness 38/100
tinymce/tinymce-angular#420 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tinymce/tinymce-angular#413 · 1 comment ·
-
needs: more info
Difficulty 4/5 3-5 days Newbie friendliness 42/100
tinymce/tinymce-angular#412 · 3 comments ·
All issues in tinymce/tinymce-angular
Similar issues
-
S: triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
snapshot-labs/stamp#666 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
GauravKarakoti/SecureFlow#1070 · 1 comment ·
-
feature:Languages/Translations good first issue ready Web
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
digitalfabrik/integreat-app#4394 ·