Fixes issue where save tag is called twice because of blur + enter. Make enter blur instead, calls it only once. Calling it twice results in issue where dummy note is deleted, creating invalid interface state
This commit is contained in:
@@ -144,11 +144,11 @@ angular.module('app')
|
||||
}
|
||||
|
||||
$scope.tagsSelectionMade = function(tag) {
|
||||
$scope.selectedTag = tag;
|
||||
|
||||
if($scope.selectedNote && $scope.selectedNote.dummy) {
|
||||
modelManager.removeItemLocally($scope.selectedNote);
|
||||
}
|
||||
|
||||
$scope.selectedTag = tag;
|
||||
}
|
||||
|
||||
$scope.tagsAddNew = function(tag) {
|
||||
|
||||
@@ -129,10 +129,12 @@ angular.module('app')
|
||||
return;
|
||||
}
|
||||
|
||||
this.save()(tag, function(savedTag){
|
||||
this.selectTag(tag);
|
||||
this.newTag = null;
|
||||
}.bind(this));
|
||||
this.save()(tag, (savedTag) => {
|
||||
$timeout(() => {
|
||||
this.selectTag(tag);
|
||||
this.newTag = null;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function inputElementForTag(tag) {
|
||||
|
||||
Reference in New Issue
Block a user