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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2829823002: [Textfield] Consider select all status for select all context menu (Closed)
Patch Set: Cleanup test code Created 3 years, 8 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 1586362197bbeeefe7910675eb0c4747e5441b76..81d8e6a1dbbcd1287559fa48ed7391259deec263 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1546,7 +1546,7 @@ bool Textfield::IsTextEditCommandEnabled(ui::TextEditCommand command) const {
ui::CLIPBOARD_TYPE_COPY_PASTE, &result);
return editable && !result.empty();
case ui::TextEditCommand::SELECT_ALL:
- return !text().empty();
+ return !text().empty() && GetSelectedRange().length() != text().length();
case ui::TextEditCommand::TRANSPOSE:
return editable && !model_->HasSelection() &&
!model_->HasCompositionText();
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698