hailwood / jQuery-Tagit

The Jquery Tagit Plugin transforms an html unordered list into a unique tagging plugin.
264 stars 109 forks source link

Submit button fires before tags save #37

Closed ericdc1 closed 12 years ago

ericdc1 commented 12 years ago

If I enter a tag and immediately hit the submit button the blur never fires to save the tag.

Is there a call I can make to "save tags" that haven't been already saved via blur, Enter, Tab, or Comma?

http://screencast.com/t/YTKosTeBTRb

If there was something like $('#tags').tagit('Save'); I could call it on the form submit.

hailwood commented 12 years ago

You could get the value from the input, call the add function, and then clear the value to do this?

ericdc1 commented 12 years ago

line 168 is eating the tag. If I call alert($(".tagit-input").val()); when the submit button is clicked the value of the textbox is cleared before I can read it.

$(this).val('').removeAttr('tagValue');

I removed this line and the bug is resolved. Please consider changing this in the source.

Thanks!