xoxco / jQuery-Tags-Input

Magically convert a simple text input into a cool tag list with this jQuery plugin.
http://xoxco.com/projects/code/tagsinput/
2.29k stars 826 forks source link

Preserve Tabindex #322

Open colinwalshryan opened 8 years ago

colinwalshryan commented 8 years ago

I wanted the tabindex of the original input to be respected so I updated the settings and the markup creation:

$.fn.tagsInput = function(options) { input = $(this); var settings = jQuery.extend({ interactive:true, defaultText:'add a tag', minChars:0, width:'300px', height:'100px', autocomplete: {selectFirst: false }, hide:true, delimiter: ',', unique:true, removeWithBackspace:true, placeholderColor:'#666666', autosize: true, comfortZone: 20, inputPadding: 6*2, tabindex: input.attr('tabindex') },options);

if (settings.interactive) { markup = markup + ''; }