bootstrap-tagautocomplete
bootstrap-tagautocomplete copied to clipboard
Doesn't work with textarea
The modifications made to bootstrap-typeahead.js don't allow it to work in a textarea but only an input or contenteditable element.
Line 86 should be:
this.query = this.$element.is("input") || this.$element.is("textarea") ? this.$element.val() : this.$element.text();
If you send in a pull request, I'd be happy to merge it in.
was this modification successful? doesn't appear to resolve the textarea issue for me.
Sadly, it doesn't quite work. Allowing the typeahead to operate on a textarea just makes it function as if the textarea was an input field. So if you type, say "Say hello to @rober" it doesn't try to search for a match for @rober, it tries to search for a complete match to "Say hello to @rober". I don't know how the behavior works for contenteditable divs, but it doesn't work for textareas in the same manner, even once textareas are allowed by the change above.