mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +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) {
|
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
|
// Scroll back to top of page
|
||||||
if (!ajaxify.isCold()) {
|
if (!ajaxify.isCold()) {
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user