From 835d16e59fafd4c72ba330960ad0c5b34640985b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sun, 22 Feb 2026 21:31:50 -0500 Subject: [PATCH] remove reconnect action dont init quickreply if element doesnt exist aka guests --- public/src/ajaxify.js | 14 -------------- public/src/modules/quickreply.js | 4 ++++ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index c09c95135a..6023efc11a 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -87,15 +87,6 @@ ajaxify.widgets = { render: render }; // Automatically reconnect to socket and re-ajaxify on success if (!socket.connected && parseInt(app.user.uid, 10) >= 0) { app.reconnect(); - - if (ajaxify.reconnectAction) { - $(window).off('action:reconnected', ajaxify.reconnectAction); - } - ajaxify.reconnectAction = function (e) { - ajaxify.go(url, callback, quiet); - $(window).off(e); - }; - $(window).on('action:reconnected', ajaxify.reconnectAction); } // Abort subsequent requests if clicked multiple times within a short window of time @@ -341,11 +332,6 @@ 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); diff --git a/public/src/modules/quickreply.js b/public/src/modules/quickreply.js index bb06d822e2..9172ca3769 100644 --- a/public/src/modules/quickreply.js +++ b/public/src/modules/quickreply.js @@ -13,6 +13,10 @@ define('quickreply', [ QuickReply.init = function (opts) { const element = components.get('topic/quickreply/text'); + if (!element.length) { + return; + } + const qrDraftId = ajaxify.data.tid ? `qr:draft:tid:${ajaxify.data.tid}` : `qr:draft:cid:${opts?.body?.cid || -1}`; const data = { element: element,