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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 2399863002: views: call UpdateAfterChange() in Textfield::InsertOrReplaceText(). (Closed)
Patch Set: Created 4 years, 2 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 | ui/views/controls/textfield/textfield.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 7ae3288bc1690809679d0de4f241fb2f858ee1a7..b27cc533ee693f907b6a07558e67a4aeb93aa92b 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -389,6 +389,10 @@ void OmniboxViewViews::OnPaste() {
// OnAfterPossibleChange(), even if identical contents are pasted.
state_before_change_.text.clear();
InsertOrReplaceText(text);
+ // Since InsertOrReplaceText() is used for programmatically updating state,
msw 2016/10/07 01:47:52 Textfield::InsertOrReplaceText is *only* called he
+ // it won't update cursor state, but since OnPaste() is actually triggered
+ // by a user action, the cursor does need to be updated.
+ UpdateAfterChange(true, true);
OnAfterPossibleChange(true);
}
}
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698