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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 2616623002: Do not send redundant selectionchange-events (decouple focus) (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index de9da91658722ce16c2e4d1f9ba55da8cf1a3666..47e312dd3b9e9e09804d037d32d9e804b700a874 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -1076,6 +1076,9 @@ static void clearSelectionIfNeeded(LocalFrame* oldFocusedFrame,
selectionStartNode->isDescendantOf(newFocusedElement))
return;
+ if (newFocusedElement && newFocusedElement->isTextControl())
yosin_UTC9 2017/01/05 05:35:33 Should we also bail out for content editable? Rat
hugoh_UTC2 2017/01/06 17:31:44 Yes, you're right. When focus jumps from <input> t
+ return;
+
if (!enclosingTextControl(selectionStartNode))
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698