Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngModel): do not dirty the input if nothing was changed - #7495

Closed
shahata wants to merge 1 commit into
angular:masterfrom
shahata:issue-7457
Closed

shahata wants to merge 1 commit into
angular:masterfrom
shahata:issue-7457

Conversation

@shahata

@shahata shahata commented May 17, 2014

Copy link
Copy Markdown
Contributor

This caused the input to become dirty every time $commitViewValue was called, even if no update to the view value was made. For example, updateOn triggers and form submit may call $commitViewValue without updating the view value.

Closes #7457

@mary-poppins

Copy link
Copy Markdown

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7495)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@shahata

shahata commented May 17, 2014

Copy link
Copy Markdown
Contributor Author

I'm not sure that this is the correct approach to handle this. @petebacondarwin - would appreciate your opinion on this.

This caused the input to become dirty every time `$commitViewValue` was called, even if no update to the view value was made. For example, `updateOn` triggers and form submit may call `$commitViewValue` without updating the view value.

Closes #7457
@petebacondarwin

Copy link
Copy Markdown
Contributor

LGTM

@petebacondarwin

Copy link
Copy Markdown
Contributor

Can't think of a better approach

@shahata

shahata commented May 17, 2014

Copy link
Copy Markdown
Contributor Author

👍

@IgorMinar

Copy link
Copy Markdown
Contributor

lgtm

RichardLitt pushed a commit to RichardLitt/angular.js that referenced this pull request May 24, 2014
…as changed

Calling `$commitViewValue` was was dirtying the input, even if no update to the view
value was made.
For example, `updateOn` triggers and form submit may call `$commitViewValue` even
if the the view value had not changed.

Closes angular#7457
Closes angular#7495
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

form and input is getting dirty by clicking on a simple button

4 participants