hashchange: Fix buggy arguments to hashchanged causing scrolltop bug.

Because jQuery passes the actual hashchange event to an onhashchange
handler, the `if reload` checks in the `hashchanged` function were
always returning true, resulting in the wrong logic being used for
computing where to send the user in the event that they edited the
hash in the browser to change their narrow.
This commit is contained in:
Tim Abbott 2016-10-22 22:07:09 -07:00
parent 56c0b80067
commit 28cefc4996
1 changed files with 3 additions and 1 deletions

View File

@ -181,7 +181,9 @@ function hashchanged(from_reload) {
exports.initialize = function () { exports.initialize = function () {
// jQuery doesn't have a hashchange event, so we manually wrap // jQuery doesn't have a hashchange event, so we manually wrap
// our event handler // our event handler
window.onhashchange = blueslip.wrap_function(hashchanged); window.onhashchange = blueslip.wrap_function(function () {
hashchanged(false);
});
hashchanged(true); hashchanged(true);
}; };