Autocompelete ajax doesn't work with enter press key

Created on 22 June 2012, over 12 years ago
Updated 15 September 2024, 3 months ago

Hi there,

I have a problem with the autocomplete select when I using the ajax feature. The following is my custom code:

$form['city'] = array(
    '#type' => 'autocomplete_deluxe',
    '#title' => t('City'),
    '#description' => t('Please type at least three characters to get the suggested cities'),
    '#multiple' => FALSE,
    '#default_value' => $city_name['city_label'],
    '#settings' => array('class' => 'city_autocomplete'),
    '#attributes' => array('class' => array('city_autocomplete')),
    '#autocomplete_deluxe_path' => url('getCity', array('absolute' => TRUE)),
    '#autocomplete_min_length' => 3,
  );

I setting up multiple => FALSE. When I type 3 characters then select from dropdown list with a click event, it work fine. But if I focus on select list and press enter key the error occurred.

source.container is undefined
source.container.append(this.span);  .../autocomplete_deluxe/autocomplete_deluxe.js line 256

Anybody can help me resolve this issue?

Thanks in advance.

🐛 Bug report
Status

Closed: outdated

Component

Code (miscellaneous)

Created by

🇻🇳Vietnam huytp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024