New issue
Advanced search Search tips

Issue 606745 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Datalist options not shown for fields with Autofill type predictions and autocomplete=off

Reported by steve25...@gmail.com, Apr 26 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Open the attached test.htm in Google Chrome
2. Click the 'dropdown' button of the first input to view its datalist options
3. Nothing happens when pressing that button

What is the expected behavior?
After step 2, a list with datalist options should become visible.

What went wrong?
dropdown list for inputs with datalist doesn't open

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes 

Does this work in other browsers? Yes 

Chrome version: 50.0.2661.87  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

After plenty of testing I found this issue to be very specific to a certain setup. You can solve the issue in the attached test.htm by modifying it in any of the following ways;
* change the name of the first input to anything but 'endPoint'
* change autocomplete to on for the first input (or remove the attribute)
* remove the last input (there need to be at least 3 inputs for this issue to persist)
* remove the form block

Please note that if there are multiple inputs with datalists and autocomplete="off" in the document, and the 'endPoint' input is in there as well; than all of the inputs will not show their respective datalists when clicking the 'dropdown' button. test2.htm showcases this behaviour.

The issue can be fixed on a page by running the below script. In the example of test2.htm it will fix it for all dropdowns even though the script only targets the 'endPoint' dropdown.
var endPoint=document.getElementsByName('endPoint')[0];
endPoint.setAttribute('autocomplete', 'off');

window.setTimeout(function(){
	endPoint.setAttribute('autocomplete', 'off');
},100);
 
test.htm
369 bytes View Download
test2.htm
695 bytes View Download
Typo in the fix script I provided in my post; it should read 'on' for the first autocomplete setting, like below.

var endPoint=document.getElementsByName('endPoint')[0];
endPoint.setAttribute('autocomplete', 'on');

window.setTimeout(function(){
	endPoint.setAttribute('autocomplete', 'off');
},100);

Comment 2 by yutak@chromium.org, Apr 28 2016

Components: -Blink Blink>Forms>Datalist
Status: Untriaged (was: Unconfirmed)

Comment 3 by tkent@chromium.org, Apr 28 2016

Components: -Blink>Forms>Datalist UI>Browser>Autofill

Comment 4 by ma...@chromium.org, Apr 28 2016

Labels: -OS-Windows -Pri-2 OS-All Pri-3
Owner: se...@chromium.org
Status: Assigned (was: Untriaged)
Behavior is indeed weird. It seems like "endPoint" triggers an Autofill type prediction for "City", which means that in coordination with autocomplete=off, datalist choices are suppressed as well.

Over to Sebastien who worked on autocomplete=off. P3 because it's rather a corner case.



Comment 5 by ma...@chromium.org, Apr 28 2016

Summary: Datalist options not shown for fields with Autofill type predictions and autocomplete=off (was: input named endPoint with autocomplete off and datalist doesn't show dropdown)

Comment 6 by ma...@chromium.org, May 1 2018

Status: Untriaged (was: Assigned)
Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".

Sign in to add a comment