Open olegkap opened 3 years ago
+1 This is also happening to me every time onMouseLeave event fired any suggestions?
Hi @etay-schur-apolicy,
Sorry for the late reply. I don't face this issue, when trying to reproduce with angular v12 and latest library version v5.1.0. Here is a stackblitz link showing the actual behavior: https://stackblitz.com/edit/angular-ogp6rc.
If you still face this issue, please kindly share a reproduction of the bug.
Hi Geo,
Thanks for looking into it.
I just upgraded to Angular 12 and still facing the issue. (Will try to create reproduceable example later)
I did noticed interesting behavior that occasionally this error doesn't occur in some cases, I think it has to do with text size or some other factor, still trying to figure it out. Maybe if parsedError would be initialized to '' then error would go away, since eventually it set to '' anyway as initial state?
parsedError: string = '';
Thanks, Oleg
Hi,
When form with editor is loaded form is marked as dirty. I did some research and found that in
registerEditorListeners
method variablehasValidationStatusChanged
will resolve to true when control initialized and no changes were made. This is due to the fact thatthis.parsedError
resolves to undefined andcurrentParsedError
is '' so following line will resolve to true:const hasValidationStatusChanged = this.parsedError !== currentParsedError;
This causing control to be flagged as modified and when its part of FormGroup it marks the whole form as dirty.
I am using ngx-monaco-editor as follow:
<ngx-monaco-editor [options]="editorOptions" formControlName="queryText" (init)="editorInit($event)"></ngx-monaco-editor>
Is there work around or its by design?
Thanks, Oleg