aehlke/tag-it — pull request #147 by robertprice (2013-02-11 10:51:01+00:00)
Title: Wrapped createTag method to flag is creation is in progress, and watch for this in the blur event

I have wrapped the createTag method so it flags if creation of a tag is in place, and when create the flag is removed. I look for this tag in the blur event and don't try to create the tag again if the flag is set.

This fixes a bug I had in Firefox where I was using a confirm() dialog in a beforeTagAdded event handler. Calling confirm() in firefox causes the field to loose focus triggering the blur event. This meant it called createTag twice for a tag in this situation. Adding the flag when creating a tag, and checking for it in the blur event handler catches this condition.