Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't render attr if current value is same as new value #10525

Merged
merged 2 commits into from
Feb 25, 2015

Conversation

raytiley
Copy link
Contributor

This fixes #10449 at least in my app. Sorry I don't have tests yet, I can try and circle back to that later.

@stefanpenner
Copy link
Member

the scenario makes sense, but we would need tests. It is also possible this should be handled elsewhere, maybe @tomdale or @mmun or @krisselden have further suggestions.

@mixonic
Copy link
Sponsor Member

mixonic commented Feb 24, 2015

We discussed this in IRC. I'd like to ship an alternative implementation where we inform the morph or view of the current DOM value. I'd like to avoid making value a special case at this level, and avoid reading attribute values from DOM at render in general.

The proposal is something like morph.forceActualValue(newValue) at _elementValueDidChange

@rwjblue
Copy link
Member

rwjblue commented Feb 25, 2015

We discussed this in the HTMLBars meeting today, and decided to go forward with this patch until we can fix it with a better API as @mixonic suggested.

I rebased, and added a test case that previously failed to hopefully help prevent regressions in the future.

rwjblue added a commit that referenced this pull request Feb 25, 2015
Don't render attr if current value is same as new value
@rwjblue rwjblue merged commit 922ab71 into emberjs:master Feb 25, 2015
@rwjblue rwjblue deleted the patch-1 branch February 25, 2015 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember.TextField cursor position lost when setting new value.
4 participants