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

Form gets $dirty after touching the model. #238

Closed
MrMartiniMo opened this issue Mar 9, 2016 · 5 comments
Closed

Form gets $dirty after touching the model. #238

MrMartiniMo opened this issue Mar 9, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@MrMartiniMo
Copy link
Contributor

Still running into the form gets $dirty issue (#48, #107).

http://plnkr.co/edit/INfZpLpz2yrRvlHitw1N?p=preview

@deeg
Copy link
Contributor

deeg commented Mar 9, 2016

The plunker does not seem to load angular-ui-tinymce correctly.

Do you mind fixing it up and I can take a look?

@MrMartiniMo
Copy link
Contributor Author

plunker updated. thanks @deeg

@deeg deeg added the bug label Mar 9, 2016
@deeg deeg added this to the 0.0.15 milestone Mar 9, 2016
@deeg deeg self-assigned this Mar 9, 2016
@deeg
Copy link
Contributor

deeg commented Mar 9, 2016

Thanks for updating, it indeed still seems like a bug.

I will take a look into fixing it. PRs are welcome if you already started looking at it.

@MrMartiniMo
Copy link
Contributor Author

It is somewhere in updateView.

console.log('dirty', form.$dirty)
ngModel.$setViewValue(content);
console.log('dirty', form.$dirty)

Maybe we need to check if the content has changed or not. But updateView is called twice, before and after ngModel's value has been changed.

@raphael-m
Copy link

It seems that the issue still exists when debounce is set to false.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants