Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Keep results from blanking on scroll. Fixes bug #1212956. Fixes bug #…
Browse files Browse the repository at this point in the history
…1072546.

The query run by infinite scroll is built from, among other things, the state of the Case-sensitive checkbox. Make sure that's synced up with the case param of the querystring on load.
  • Loading branch information
erikrose committed Nov 3, 2015
1 parent 41e8410 commit e57c862
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dxr/static_unhashed/js/dxr.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ $(function() {
// load the results of the query and activate infinite scroll.
window.addEventListener('load', function() {
if (/search$/.test(window.location.pathname) && window.location.search) {
// Set case-sensitive checkbox according to the URL, and make sure
// the localstorage mirrors it.
var urlIsCaseSensitive = caseFromUrl() === true;
caseSensitiveBox.prop('checked', urlIsCaseSensitive);
localStorage.setItem('caseSensitive', urlIsCaseSensitive);
doQuery(false, window.location.href);
}
});
Expand Down

0 comments on commit e57c862

Please sign in to comment.