         set(value: subject.filter, for: QueryParameterKeys.subject, in: &params)
         environment?.analytics.trackSubjectDiscovery(subjectID: subject.filter)
         if let url = DiscoveryWebViewHelper.buildQuery(baseURL: baseURL.URLString, params: params) {
+            searchBar.resignFirstResponder()
             loadController.state = .Initial
             loadRequest(withURL: url)
         }

    }
    
    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
        guard discoveryType == .program,
            searchText.isEmpty,
            webView.url != baseURL,
            let baseURL = baseURL else { return }
        loadRequest(withURL: baseURL)
    }

    func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {

import WebKit

fileprivate enum QueryParameterKeys {
    static let searchQuery = "q"
    static let subject = "subject"
}

