mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Blaze: Don't update input elements if their value doesn't need updating
This resolves #2403. Specifically, if you implement some form of two-way databinding, and you modify an input field in some way other than adding characters to the end, the insertion point jumps to the end. Still need to write a test for this.
This commit is contained in:
@@ -165,7 +165,8 @@ var BooleanHandler = AttributeHandler.extend({
|
|||||||
|
|
||||||
var ValueHandler = AttributeHandler.extend({
|
var ValueHandler = AttributeHandler.extend({
|
||||||
update: function (element, oldValue, value) {
|
update: function (element, oldValue, value) {
|
||||||
element.value = value;
|
if (value !== element.value)
|
||||||
|
element.value = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user