Windows Firefox 2.0.0.14
Steps to reproduce:
1. Type in a form which has autocomplete enabled, for example on api.drupal.org
2. Before the autocomplete has finished, press the form's submit button
Actual results:
Nothing happens. The submit button needs to be pressed again before the form is submitted
Expected results:
The button click should cancel the autocomplete and also submit the form in a single click without requiring a second click.
This is highly annoying when the user clicks on the submit button and then starts waiting for the form submit results to come back, when in reality, the form has not actually been submitted to the server yet.
Comments
Comment #1
dpearcefl commentedDoes this issue exist in current D6?
Comment #2
dpearcefl commentedComment #3
Anonymous (not verified) commentedYes it exists.
Comment #4
dpearcefl commentedIt also happens on drupal.org
Comment #5
shyamala commentedTagging
Comment #6
shyamala commentedrelated reading:
#1228760: Autocomplete feature bug in IE 8, causing submit-click not to register. (need to click twice to actually submit the form)
Comment #7
webchickFixing tag.
Comment #8
Johnny vd Laar commentedAttached is a patch to drupal 7.x that doesn't show the alert message when the autocomplete submit is cancelled. Don't know whether this is ok so please let someone check who is more familiar with this.
Comment #9
Johnny vd Laar commentedoh this is the wrong version of the patch file this one is made with git
Comment #10
tomas.teicher commentedthis patch doesn't work for me. I haven't problem with displaying alerts.
I have the same problem as Wesley Tanaka,
when autocomplete is active you cannot submit the form. You have to click on submit button twice. After first click, the autocomplete div is hidden and then you have to click on submit button again to send the form.
Comment #11
nod_Still valid as far as I can tell and #8 and #9 don't address the issue.
Comment #12
BarisW commentedActually, there are two separate issues here.
The first issue is that you need to submit twice when selecting a word from the suggestions. I'm using Search API autocomplete on all my sites and the maintainer of that module created a fix for this issue: #1278042: Add auto-submit for the autocompletion, so that is not longer a problem for me. Might be worth looking into how he fixed it, so we could do this for Drupal core as well.
The other issue is that Drupal fires a Javascript error when you try to submit the form while it is still searching for autocompletions. I found out that this only occurs with Javascript aggregation enabled. The patch in #9 (thanks Johnny) fixes this for me (Drupal 7).
Comment #13
Anonymous (not verified) commentedI can confirm that we need the patch from #9 to fix JS errors when people clicks submit before autocomplete was done searching.
Comment #14
Pls commentedI can only confirm that patch from #9 fixes those JS errors described above.
Comment #15
kingandyLooks to me like the patches in #8 and #9 are related to #1232416: Drupal alerts "An AJAX HTTP request terminated abnormally" during normal site operation, confusing site visitors/editors, and are nothing to do with this issue (autocomplete hijacking all mouse clicks). With that in mind I don't think this really merits the "needs work" status...
Comment #16
seutje commented@12: I don't think we can straight copy that solution, as Search API never has to deal with autocomplete fields with multiple values (like taxonomy free-tagging) or with autocomplete fields that are part of a larger form.
Comment #17
seutje commentedAlso, I tested this on http://api.drupal.org and it seems like it uses Search API Autocomplete, and it seems like it already triggers the submit when I hit enter.
Comment #18
kingandyThis issue is about the mouse click, not the enter key. How does a.d.o react to a mouse click while the autocomplete is open? (I'd test myself but I'm on a mobile device...)
Comment #19
seutje commentedwhen I type "file", click "submit", it searches for file
when I type "file", click "file.inc", it goes to the file.inc page
Comment #20
kingandyConfirmed ... however I believe a.d.o is running Drupal 6.x, and the 6.x version of the API module uses its own javascript for the autocomplete.
Comment #21
kenorb commentedDuplicated of this: #1330538: Pressing search button while autocomplete is still loading
Module: Search API autocomplete
See the screenshot:
http://drupal.org/files/Schermafdruk_0.png
Comment #22
tkoleary commentedPlease follow progress on: #2346973: Improve usability, accessibility, and scalability of long select lists
Changing to Select2 may render this issue obsolete
Comment #23
nod_still an issue with the jQuery autocomplete?
Comment #32
pameeela commentedMoving this over to D7 as I can no longer reproduce it in D8, but it definitely still occurs in 7.
Comment #33
pameeela commented