The new TextboxList is here

It’s been some time since TextboxList got some attention. It is undoubtedly one of my most popular JavaScript projects, along with the famous Fancy Menu (MorphList) and its slideshow sibling, BarackSlideshow.

TextboxList (demo) has been rewritten from scratch, and it’s more solid than ever. The first time around, elegance was not one of the goals. I focused on releasing the first open source script that reproduced the Facebook’s tokenizer.

Let’s see the new changes:

TextboxList

  • Compatible with MooTools 1.2.x
  • New options, such as addOnEnter, which adds boxes upon pressing enter (useful for tags or categories widgets).
  • More events, which gives the developer more power to extend it.
  • Each element is now identified by an id, a plain value and a HTML value.
  • Use of control, alt, meta keys no longer interfere with the elements keyboard navigation.
  • Bugs with text selection fixed.
  • Improved API, even more extensible.
  • Plugins support

Textboxlist.Autocomplete

This is the most important official plugin. It also has been rewritten, and packs new features:

  • Flexible. It does not depend on a specific data source (XHR, Json). Instead, the developer supplies the data which can come from anywhere.
  • Binary search for maximum performance
  • Simpler CSS with comments for non-experienced developers.

Without further ado, head to the project page to check out the demos and downloads.

Displaying only a subset of the comments. Click here to display all comments.

  1. Andre LeFort about 1 year ago

    Hi Guillermo!

    First off, many many thanks for this awesome textboxlist widget! I’m very impressed with it!

    However, it seems I may have found a small bug when using the autocomplete plugin. The bug can be reproduced on your demo page.

    When adding an item from a the autocomplete dropdown, it isn’t actually being added to the list of bits for the textboxlist. This can be demonstrated by adding one and then hitting the submit button. You’ll notice it isn’t showing up in your array that you print out.

    Also, this is for the mootools version…but it also seems to happen in the jQuery version.

    Any chance you could take a look at this? Cheers!

    Andre

    • Andre LeFort about 1 year ago

      Just to elaborate….the issue only pops up when I select the very first item in the possible matches, in this case, AIAI. Otherwise, the bit value is actually set and flows through to the php script…

    • Andre LeFort about 1 year ago

      I’ve actually managed to get around this with a rather simple hack. The first results I return as JSON to my Autocomplete plugin through setValues is an array with blank strings for values.

      I thought I would post this in case anyone needed a quick workaround quickly…