
What are the steps required to reproduce the bug?
Give focus to field that supports Drupal powered auto-complete from previous entries. Press up/down as if you were selecting a suggestion even though there isn't one as you haven't typed anything.
Tab to the next field without typing anything in to the field.
What behavior were you expecting?
Field should be left empty as we haven't selected a suggestion.
What happened instead?
'undefined' is printed in to the field. Clearly the field is being monitored for up/down keypresses. If there are no suggestions shown the auto-complete variable should not be assigned.
Mac OS X 10.4.10. PHP version 5.2.3, Drupal version 5.2.
I haven't thoroughly tested this bug. Just thought I'd flag it as an issue although I doubt it's Safari v3.0.3 specific.
Comment | File | Size | Author |
---|---|---|---|
#22 | autocomplete-undefined-D6-2.patch | 450 bytes | c960657 |
#16 | autocomplete-undefined-D6-1.patch | 784 bytes | c960657 |
#10 | 172755-autocompletee.patch | 441 bytes | klausi |
#8 | autocomplete-undefined-1.patch | 786 bytes | c960657 |
Comments
Comment #1
jamesconroyfinn CreditAttribution: jamesconroyfinn commentedThis bug only occurs when pressing down, not up.
Comment #2
nedjoImproving title, no patch so setting to active.
Comment #3
mlncn CreditAttribution: mlncn commentedConfirmed cross-browser (previously documented on Agaric's site). This is a significant bug, it doesn't just appear when you type nothing-- it will also replace everything you've typed with 'undefined'.
To reproduce:
Everything you have typed is replaced with undefined.
Comment #4
nielsvm CreditAttribution: nielsvm commentedConfirmed in Opera and Konqueror...
Comment #5
mlncn CreditAttribution: mlncn commentedI think this still belongs to taxonomy.module still.
Comment #6
LAsan CreditAttribution: LAsan commentedAny news on this issue?
Comment #7
mrcalc CreditAttribution: mrcalc commentedThe above bug could be fixed in Drupal 5 by adding the following code to the beginning of Drupal.jsAC.prototype.selectDown in misc/autocomplete.js
Can anyone comment on whether this could cause any other problems with autocomplete?
Comment #8
c960657 CreditAttribution: c960657 commentedThis bug also exists in D6 and D7. I have seen this occasionally but couldn't find a way to reproduce it, but it really is a simple as described in this issue.
Comment #9
casey CreditAttribution: casey commentedTested and working. Simple and effective.
Comment #10
klausiChanged "else if" to "elseif" (coding standards)
Comment #11
c960657 CreditAttribution: c960657 commentedelseif does not exist in JavaScript. Setting the patch in #8 back to RTBC.
Comment #12
klausiHm ok, fixed the javascript coding standards docs at http://drupal.org/node/172169
Comment #13
klausi#8: autocomplete-undefined-1.patch queued for re-testing.
Comment #14
aspilicious CreditAttribution: aspilicious commentedJust to remind Dries or Webchick: add patch in #8 NOT #10 :)
Comment #15
dries CreditAttribution: dries commentedCommitted #8 to CVS HEAD. Thanks.
Comment #16
c960657 CreditAttribution: c960657 commentedD6 backport.
Comment #17
c960657 CreditAttribution: c960657 commentedComment #19
c960657 CreditAttribution: c960657 commented#16: autocomplete-undefined-D6-1.patch queued for re-testing.
Comment #21
c960657 CreditAttribution: c960657 commented#16: autocomplete-undefined-D6-1.patch queued for re-testing.
Comment #22
c960657 CreditAttribution: c960657 commented