Facebox not playing nice with jQuery UI Autocomplete on second load

Skip to first unread message

Sam Bo

Jun 24, 2014, 3:56:06 PM6/24/14
to fac...@googlegroups.com
I am using a jQuery UI Autocomplete select box in my facebox window.  All works well the first time the facebox is used, the autocorrect fills in properly and the values work.  However, when the facebox is closed and then reopened, after an autocomplete selection or change is made, it closes the facebox.  Somehow the 'facebox.close' trigger is being called.  I don't know if the autocomplete is doing it or not.

I am initializing with this each time the facebox window is called:

    //disable 'esc' key since that conflicts with autocomplete
    //init the facebox links within the facebox
    fb = $('a[rel*=add_user_facebox]').facebox();

    uc_autocomplete = $("#user_company").autocomplete({
        source: "/service/ajax_list_org_names.php",
        minLength: 2,
        select: function(event, ui) {
        //    return handle_uc_select(ui);
        change: function(event, ui) {
        //    return handle_uc_change(ui);

    udn_autocomplete = $("#user_display_name").autocomplete({
        source: "/service/ajax_list_user_names.php",
        minLength: 3,
        select: function(event, ui) {
        //    return handle_udn_select(ui);
        change: function(event, ui) {
        //    return handle_udn_change(ui);

Reply all
Reply to author
0 new messages