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

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

Issue 15684004: Refine Views textfield state interaction, testing, and examples. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add and expand on comments. Created 7 years, 7 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: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 73cdb48853d26058f02399f41e855469e00984b4..b5aa80bfe28694bad943926d0e66cec338b057e3 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -128,8 +128,8 @@ TextfieldController* Textfield::GetController() const {
}
void Textfield::SetReadOnly(bool read_only) {
+ // Update read-only without changing the focusable state (or active, etc.).
read_only_ = read_only;
- set_focusable(!read_only);
if (native_wrapper_) {
native_wrapper_->UpdateReadOnly();
native_wrapper_->UpdateTextColor();
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views_unittest.cc ('k') | ui/views/examples/textfield_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698