Problem/Motivation
#2418017-125: Implement autocomplete UI for the link widget from @yched
$autocomplete is :
var $autocomplete = $(context).find('input.form-autocomplete').once('autocomplete');,
so it contains all autocomplete elements in the context for the current Drupal.behaviors.attach() call.
Then the code builds one single autocomplete.options for all of them, and attaches it to all the autocompletes in $autocomplete. Thus, unless I'm missing something, the data-autocomplete-first-character-blacklist set in one autocomplete spills over to the all of the others ?
Steps to reproduce
See #2.
Proposed resolution
TBD
Remaining tasks
Write a test
Fix the bug
Review
Commit
Comments
Comment #1
Wim LeersImpossible since we don't have front-end tests.
Comment #2
yched CreditAttribution: yched commentedSteps to reproduce the bug :
I guess this needs a form with two autocomplete fields each having different "first-character-blacklist" property,
I think the configuration of one of the textfield will leak onto the other (not sure which one wins, first or second)
Comment #3
YesCT CreditAttribution: YesCT commented@Wim Leers yeah, we can't add a front-end test to core... but we could write one (a behat test?) that we could use locally. That might be helpful as we work on this issue.
Comment #4
anonI think it's a bigger problem.
There are no "instances" at all when using autocomplete. All elements will share the same settings, and that makes it impossible to override for just one element.
Comment #5
anonComment #17
quietone CreditAttribution: quietone at PreviousNext commentedI got this as a random bug smash issue. I know very little about javascript so I asked in #bugsmash. Both darvanen and larowlan responded.
This issue is still valid, and minor because it in edge case.
Comment #18
nod_ah yes, still valid indeed. you said minor but put it at major, that's fine I would say this is major. All autocomplete settings are shared so if one changes something all the others will change too.
It's still the case in 10.1.x