Prevented user-created dependency loops when setting effects as calclations

This commit is contained in:
Thaum
2014-11-20 12:55:42 +00:00
parent ca7a625534
commit 252d0f989b
7 changed files with 146 additions and 111 deletions

View File

@@ -34,14 +34,13 @@ Template.textField.events({
//TODO sanitise the html
var setter = {};
setter[this.field] = text;
Characters.update(this.character._id, {$set: setter}, function(error, result) {
if(error) console.log(error);
});
Characters.update(this.character._id, {$set: setter}, {removeEmptyStrings: false});
},
"click #textOutput": function(){
Template.instance().editing.set(true);
Tracker.afterFlush(function(){
$("#textInput").focus();
placeCaretAtEnd($("#textInput"));
});
}
})