diff --git a/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel+Search.swift b/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel+Search.swift index d3159abba877..270feeb7d5c8 100644 --- a/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel+Search.swift +++ b/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel+Search.swift @@ -27,6 +27,11 @@ extension HistoryPanel: UISearchBarDelegate { performSearch(term: searchText) } + func searchBarCancelButtonClicked(_ searchBar: UISearchBar) { + bottomStackView.isHidden = true + searchBar.resignFirstResponder() + } + func startSearchState() { updatePanelState(newState: .history(state: .search)) bottomStackView.isHidden = false diff --git a/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel.swift b/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel.swift index 7e66d454912b..b25c51be515f 100644 --- a/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel.swift +++ b/firefox-ios/Client/Frontend/Library/HistoryPanel/HistoryPanel.swift @@ -97,6 +97,7 @@ class HistoryPanel: UIViewController, searchbar.searchTextField.placeholder = self.viewModel.searchHistoryPlaceholder searchbar.returnKeyType = .go searchbar.delegate = self + searchbar.showsCancelButton = true } private lazy var tableView: UITableView = .build { [weak self] tableView in @@ -176,7 +177,6 @@ class HistoryPanel: UIViewController, setupLayout() configureDataSource() applyTheme() - // Update theme of already existing view bottomStackView.applyTheme(theme: currentTheme()) }