Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Accidentally $setPristine on parent form controller #253

Open
@lordfriend

Description

@lordfriend

I'm encounter problem caused by this line of code https://github.com/angular-ui/ui-tinymce/blob/master/src/tinymce.js#L84 which set parent form a pristine state on its init event. I use ui-tinymce inside an ngIf which may cause the ui-tinymce initialize multiple times when user switch between different type of model

it looks like this snippet

<div ng-if="component.type==='image'">
    <image-component ng-model="component.data"></image-component>
</div>
<div ng-if="component.type==='text'">
    <textarea ng-model="component.data" ui-tinymce></textarea>
</div>

So what I expect is the ui-tinymce should not invoke form.$setPristine() on its initialisation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions