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

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

Issue 1309503004: Select elements should clear type-ahead session on blur. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/forms/TypeAhead.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSelectElement.cpp
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
index 93af0b216963e078bdb62f8c9b3a07511ae8bae7..59c17bbc8a1c3bc0778a792ff166ca24c0cb4494 100644
--- a/Source/core/html/HTMLSelectElement.cpp
+++ b/Source/core/html/HTMLSelectElement.cpp
@@ -1052,6 +1052,7 @@ void HTMLSelectElement::dispatchFocusEvent(Element* oldFocusedElement, WebFocusT
void HTMLSelectElement::dispatchBlurEvent(Element* newFocusedElement, WebFocusType type, InputDeviceCapabilities* sourceCapabilities)
{
+ m_typeAhead.resetSession();
// We only need to fire change events here for menu lists, because we fire
// change events for list boxes whenever the selection change is actually made.
// This matches other browsers' behavior.
@@ -1951,4 +1952,9 @@ void HTMLSelectElement::detach(const AttachContext& context)
m_popup = nullptr;
}
+void HTMLSelectElement::resetTypeAheadSessionForTesting()
+{
+ m_typeAhead.resetSession();
+}
+
} // namespace blink
« no previous file with comments | « Source/core/html/HTMLSelectElement.h ('k') | Source/core/html/forms/TypeAhead.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698