I am using the Select2 plugin, but the built in search functionality doesn't work when the plugin is used with a jQuery modal dialog. I have a fiddle that shows the problem at...
http://jsfiddle.net/jeljeljel/s3AFx/
Notice the Search box will not accept the focus. There is supposed to be a workaround with the _allowInteraction event (http://api.jqueryui.com/dialog/#method-_allowInteraction), but it isn't working for me.
Can anyone help to see how to make this Fiddle work?
Also, this SO post (select2 plugin works fine when not inside a jquery modal dialog) discusses the same issue, but the suggested fixes are not working for me.
HTML
<div class="dialog">
<select>
<option>A tall ship was seen a</option>
<option>A tall ship was seen b</option>
<option>A tall ship was seen c</option>
<option>A tall ship was seen d</option>
<option>A tall ship was seen e</option>
<option>A tall ship was seen f</option>
</select>
</div>
JAVASCRIPT
$('.dialog').dialog({
modal: true,
_allowInteraction: function (event) {
return !!$(event.target).is(".select2-input") || this._super(event);
}
});
$('select').select2();