vendredi 24 juin 2016

How to remove repeated tag characters in bootstrap tagsinput


I am trying to use Bootstrap Tagsinput with Typeahead on Bootstrap 3, using Bootstrap-3-Typeahead since it seems the original typeahead was abandoned by Twitter. I have some weird behaviour, where the characters that get accepted as a tag remain in the input field. This creates a very weird user experience. In the example shown here, I typed 'Volunteer' (which was one of the values in the typeahead) and after selecting it as the required tag, the characters remained there, partially visible. This is my code. I am using JQuery 1.12.3, Bootstrap 3.3.6, and TagsInput 0.6.1. The latter two loaded in the footer, together with Bootstrap3-Typeahaed 3.1.0. <input type="text" name="tags" id="tags" data-provide="typeahead" value=""/> <script> $(document).ready(function (){ var type = ["Donor","Volunteer","Member","Resource","Follow-up","Friend"]; var elt = $('#tags'); elt.tagsinput({ typeahead: { source: type } }); }); </script> Do I have something wrong that I am missing that is causing this?

Aucun commentaire:

Enregistrer un commentaire