Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: Source/core/html/HTMLSelectElement.cpp

Issue 319443003: Clear the suggested value while setting value for <select> element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test file as per Ilya's review comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 812d4a447090b56997276d374bf386d1fd0697dd..597021b5f195bbd9d0b2c824d86178d1699727c2 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -258,6 +258,7 @@ void HTMLSelectElement::setValue(const String &value, bool sendEvents)
}
int previousSelectedIndex = selectedIndex();
+ setSuggestedIndex(-1);
setSelectedIndex(optionIndex);
if (sendEvents && previousSelectedIndex != selectedIndex()) {

Powered by Google App Engine
This is Rietveld 408576698