How can this be made more elegant?

The solution of course, is Select Other!

Select Other is a jQuery plugin that will transform any select element into an input field on command!

After transforming, an exit button is placed within the field allowing it to be changed back to a select field.

Select Other simply changes the element tag. So all styling of the field is kept during the transformation. Positions for the exit button are calculated from its position and dimensions, so it will always be placed on the right side of the field.