mirror of https://github.com/zulip/zulip.git
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:
parent
56c0b80067
commit
28cefc4996
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue