New issue
Advanced search Search tips

Issue 709944 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

It is impossible to exit the autocomplete mode using JavaScript

Reported by vladimir...@devexpress.com, Apr 10 2017

Issue description

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

Steps to reproduce the problem:
I have a text box and two buttons on an HTML page:

<form>

<input type="text" id="inp" />

<input type="button" value="clear text" onclick="inp.value = ''; inp.focus();" />

<input type="submit" value="submit" />

</form>

When an end-user selects one of autocomplete items, the text box background color becomes yellow (it's ok). As you can see, there is the 'clear text' button. If an end-user clicks it, the text box text is removed. However, the editor is still in autocomplete mode (its background is still yellow). I have attached a full HTML page for testing and a video that demonstrates this behavior.

I need neither to totally disable the autocomplete mode nor to change the text box back color. I need to exit the autocomplete mode when the button has been clicked. In other words, the ‘inp’ HTML input should not have the ‘-webkit-autofill’ pseudo class.

Thanks.

What is the expected behavior?
An autocomplete mode ends and the editor has a default appearance when a text is modified using JavaScript.

What went wrong?
The editor is still in autocomplete mode after a text is modified using JavaScript.

Did this work before? N/A 

Chrome version: 57.0.2987.133  Channel: stable
OS Version: 6.3
Flash Version: Shockwave Flash 25.0 r0

I also asked the same on google groups (https://groups.google.com/a/chromium.org/forum/#!topic/chromium-html5/_m_qHZ-29jI) and was recommended to submit an issue here. 
Would you please clarify how to end this mode using JavaScript (as soon as the ‘clear text’ button is clicked)?
 
test.html
266 bytes View Download
video.swf
367 KB Download
Cc: pbomm...@chromium.org
Components: UI>Browser>Autofill
Labels: M-59 OS-Linux OS-Mac
Status: Available (was: Unconfirmed)
I see similar behavior on Windows 7,10, Mac and Linux(ubuntu 14.04Lts) Chrome stable i.e., Current and previous stable channels i.e., 53.0.2785.143, 56.0.2924.87 and 57.0.2987.143, Beta(58.0.3029.54), Dev(59.0.3063.4) and Canary(59.0.3067.0).


Cc: rogerm@chromium.org
Components: Blink>Forms

Comment 3 by rogerm@chromium.org, Apr 11 2017

Cc: vabr@chromium.org
Looks like we're not noticing when the value is set to some string by javascript (as opposed to the user typing or pasting into the field) so we're not clearing the "is autofilled" status.

vabr@, this likely also occurs with password manager handled fields. Or have you already seen and fixed this?

Comment 4 by vabr@chromium.org, Apr 12 2017

Yes, the same issue is seen with passwords (tested with the attached file). I was not aware of it previously.
test.html
322 bytes View Download

Comment 5 by tkent@chromium.org, Jun 27 2017

 Issue 731062  has been merged into this issue.

Comment 6 by vabr@chromium.org, Jun 27 2017

Cc: -vabr@chromium.org

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

Status: Untriaged (was: Available)

Comment 8 by tkent@chromium.org, May 7 2018

Components: -Blink>Forms
Removing Blink>Forms because I think Autofill team is responsible for this.

Sign in to add a comment