It is impossible to exit the autocomplete mode using JavaScript
Reported by
vladimir...@devexpress.com,
Apr 10 2017
|
||||||
Issue descriptionUserAgent: 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)?
,
Apr 10 2017
,
Apr 11 2017
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?
,
Apr 12 2017
Yes, the same issue is seen with passwords (tested with the attached file). I was not aware of it previously.
,
Jun 27 2017
Issue 731062 has been merged into this issue.
,
Jun 27 2017
,
May 1 2018
,
May 7 2018
Removing Blink>Forms because I think Autofill team is responsible for this. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by pbomm...@chromium.org
, Apr 10 2017Components: UI>Browser>Autofill
Labels: M-59 OS-Linux OS-Mac
Status: Available (was: Unconfirmed)