troubles with input/select in elgg-lightbox

Hi everyone,

I am using the latest release of elgg. I have some troubles with input/select in elgg-lightbox. 

The search box of the  input/select  is not working (unable to use the search box of input/select) when the input/select in on a form in a elgg-lightbox.

Could someone help me ?

Regards,

 

  • Any code snippet? No code, no ideas.

  • Hi

    The Search Box of the  input/select works perfectly on a normal form. But when the form is on a elgg-lightbox, the search box of the  input/select  is not working (unable to use the search box of input/select) .

    Here is the code. 

    
    $end_year_array = array();
    $annee = date("Y");
    
    for ($i = 1958; $i <= $annee + 7; $i++) {
        $end_year_array[$i] = strval($i);
    }
    
    echo elgg_view_field(array(
        '#type' => 'select',
        '#label' => "Select the Year",
        'name' => 'endyear',
        'options_values' => $end_year_array,
    ))';

     

    Regards,

     

  • Are you sure that it's not a problem with z-index?

  • Hi i still have the same behaviour, the search box of input/select is not working when i load the form in elgg-lightbox.

    Need help

  • Same code or were there any changes?

    Linking to a problem form could help what the error is...

  • Hi @RvR,

    I just found the solution.

    I am using hypeAutocomple plugin. It replaces select by select2 (https://select2.org). That's why I was having such behaviour.

    So I solve the issue by adding 'trapFocus' => false.

    'link_class' => ['elgg-button', 'elgg-button-action', 'mrs', 'elgg-lightbox'],
    
    'href' => elgg_http_add_url_query_elements('ajax/view/pessekazer/add', [
    
    'guid' => $guid,
    
    ]),
    
    'data-colorbox-opts' => json_encode([
    
    'overlayClose' => false, 
    
    'trapFocus' => false,
    
    ]),
     

    Regards,

     

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking