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

Unified Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 1785033004: Disable Find-In-Page buttons when no text is entered (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: chrome/browser/ui/views/find_bar_view.cc
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 7cf53c30ff5457947fd74990d30f6ce57e8b1039..40b16b7009903039c3a98002940b58c329edae42 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -605,9 +605,7 @@ void FindBarView::Find(const base::string16& search_text) {
}
void FindBarView::UpdateMatchCountAppearance(bool no_match) {
- // Enable the buttons if there is a match or if there is a match count text
- // set (from a prepopulated view).
- bool enable_buttons = !match_count_text_->text().empty() || !no_match;
+ bool enable_buttons = !match_count_text_->text().empty() && !no_match;
find_previous_button_->SetEnabled(enable_buttons);
find_next_button_->SetEnabled(enable_buttons);

Powered by Google App Engine
This is Rietveld 408576698