How to exit the autocomplete mode

31 views
Skip to first unread message

Vladimir

unread,
Apr 7, 2017, 4:23:02 AM4/7/17
to Chromium HTML5

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.

 

Would you please clarify how to end this mode using JavaScript (as soon as the ‘clear text’ button is clicked)?

 

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.

test.html
video.swf

PhistucK

unread,
Apr 7, 2017, 5:15:43 AM4/7/17
to Vladimir, Chromium HTML5
This looks like a bug (so you cannot really prevent that from happening).
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe@chromium.org.
To post to this group, send email to chromiu...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Reply all
Reply to author
Forward
0 new messages