fix a bug where datalist elements wouldn't actually set the value of the input associated with them

This commit is contained in:
Heilig Benedek 2017-09-10 22:11:56 +02:00 committed by Cheng Zhao
parent 40b94e97e5
commit 5daaff91ea

View file

@ -203,7 +203,7 @@ void AutofillAgent::ShowPopup(
void AutofillAgent::OnAcceptSuggestion(base::string16 suggestion) {
auto element = render_frame()->GetWebFrame()->GetDocument().FocusedElement();
if (element.IsFormControlElement()) {
ToWebInputElement(&element)->SetSuggestedValue(
ToWebInputElement(&element)->SetAutofillValue(
blink::WebString::FromUTF16(suggestion));
}
}