Hi,
I have a JS script that relies upon the 'autocompleteSelect' event.
If I use a core theme like bartik, everything goes fine: the event is fired once when I click on an item in the autocomplete list.
If I use the bootstrap theme, the event is fired twice.
It seems to be related to the fact that the misc/autocomplete.js script is overridden in the bootstrap theme.
Thank you in advance for your help.
Regards,
Martin
Comments
Comment #2
mduvergey commentedI'm able to get it working right by changing
to
but could someone validate this?
Comment #3
markhalliwellThis is relatively close to the same code in core: http://cgit.drupalcode.org/drupal/tree/misc/autocomplete.js?h=7.x#n221
I can only imagine that the difference here is that the link we're injecting (to match bootstrap's styling) is propagating the event upwards? I'm not entirely sure, but try the following:
Comment #5
markhalliwell