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

Unified Diff: ios/chrome/browser/find_in_page/find_in_page_controller.mm

Issue 1614913002: Fixes disappearing text in Find in page toolbar in slide over. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: ios/chrome/browser/find_in_page/find_in_page_controller.mm
diff --git a/ios/chrome/browser/find_in_page/find_in_page_controller.mm b/ios/chrome/browser/find_in_page/find_in_page_controller.mm
index d6da2ebe18d896ff06e6e3832f342ef4e73bb795..81528336a4c3c42ba1b3f754c72b6a0bb59cd14b 100644
--- a/ios/chrome/browser/find_in_page/find_in_page_controller.mm
+++ b/ios/chrome/browser/find_in_page/find_in_page_controller.mm
@@ -290,6 +290,12 @@ const NSTimeInterval kRecurringPumpDelay = .01;
}
- (void)restoreSearchTerm {
+ // Pasteboards always return nil in background:
+ if ([[UIApplication sharedApplication] applicationState] !=
+ UIApplicationStateActive) {
+ return;
+ }
+
NSString* term = [self findPasteboard].string;
[[self findInPageModel] updateQuery:(term ? term : @"") matches:0];
}
« 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