Skip to content

Commit

Permalink
Tags : Make it so entered Tags are registered on blur.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMis committed Sep 8, 2023
1 parent f3f7d76 commit ebf9bf8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ui/src/core/xibo-cms.js
Expand Up @@ -546,6 +546,15 @@ function XiboInitialise(scope) {
// Normal tags input
$(self).tagsinput();
}

// When tagsinput loses focus, add the tag,
// do not rely solely on comma or selection from suggestions
$('.bootstrap-tagsinput input').blur(function() {
if ($(this).val() !== '') {
$(self).tagsinput('add', $(this).val());
$(this).val('');
}
});
});

// Initialize tag with values function from xibo-forms.js
Expand Down

0 comments on commit ebf9bf8

Please sign in to comment.