mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-07 15:20:04 +01:00
fix: double-ajaxify on socket connect
This commit is contained in:
@@ -360,6 +360,11 @@ ajaxify.widgets = { render: render };
|
||||
}
|
||||
|
||||
ajaxify.end = function (url, tpl_url) {
|
||||
// Cancel reconnectAction if there was one pending, since ajaxify was a success
|
||||
if (ajaxify.reconnectAction) {
|
||||
$(window).off('action:reconnected', ajaxify.reconnectAction);
|
||||
}
|
||||
|
||||
// Scroll back to top of page
|
||||
if (!ajaxify.isCold()) {
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user