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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpearcefl’s picture

Status: Active » Postponed (maintainer needs more info)

Does this issue exist in current D6?

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Active
Anonymous’s picture

Yes it exists.

dpearcefl’s picture

Version: 6.2 » 6.22

It also happens on drupal.org

Shyamala’s picture

Version: 6.22 » 8.x-dev

Tagging

webchick’s picture

Fixing tag.

Johnny vd Laar’s picture

Version: 8.x-dev » 7.x-dev
Status: Active » Needs review
FileSize
412 bytes

Attached 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.

Johnny vd Laar’s picture

oh this is the wrong version of the patch file this one is made with git

tomas.teicher’s picture

this 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.

nod_’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work
Issue tags: -Needs backport to D6

Still valid as far as I can tell and #8 and #9 don't address the issue.

BarisW’s picture

Actually, 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).

Anonymous’s picture

I can confirm that we need the patch from #9 to fix JS errors when people clicks submit before autocomplete was done searching.

Pls’s picture

I can only confirm that patch from #9 fixes those JS errors described above.

kingandy’s picture

Status: Needs work » Active

Looks 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...

seutje’s picture

@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.

seutje’s picture

Also, 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.

kingandy’s picture

This 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...)

seutje’s picture

when I type "file", click "submit", it searches for file
when I type "file", click "file.inc", it goes to the file.inc page

kingandy’s picture

Confirmed ... 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.

kenorb’s picture

tkoleary’s picture

Issue summary: View changes

Please follow progress on: #2346973: Improve usability, accessibility, and scalability of long select lists

Changing to Select2 may render this issue obsolete

nod_’s picture

Status: Active » Postponed (maintainer needs more info)

still an issue with the jQuery autocomplete?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela’s picture

Version: 8.9.x-dev » 7.x-dev
Status: Postponed (maintainer needs more info) » Active
Issue tags: -Needs backport to D7

Moving this over to D7 as I can no longer reproduce it in D8, but it definitely still occurs in 7.

pameeela’s picture

Issue tags: +Bug Smash Initiative