Fixed Quote button only partly functional on post_macros::post render outside thread view

Lukas W.

Well-known member
Affected version
2.2.4
When rendering post_macros::post outside thread view, the quote button will only work, when message.js is not included.

Accessing a post directly (e.g. https://xenforo.com/community/posts/1500879/show) and clicking Quote will correctly redirect to the reply to thread page, with the post inserted as quote, but logs an error to the browser console: Could not find click handler for quote, since message.js is not loaded on that view.

If a post is rendered and message.js is loaded, but no quick reply target is found, the following error is logged on the page instead, and nothing happens:
Code:
message.js?_v=e0745535:348

Uncaught TypeError: Cannot read property 'top' of undefined
    at fn.click (message.js?_v=e0745535:348)
    at fn._onEvent (core.js?_v=e0745535:7953)
    at initElement (core.js?_v=e0745535:7867)
    at HTMLAnchorElement.<anonymous> (core.js?_v=e0745535:7823)
    at HTMLDocument.dispatch (jquery-3.5.1.min.js?_v=e0745535:2)
    at HTMLDocument.v.handle (jquery-3.5.1.min.js?_v=e0745535:2)
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.6).

Change log:
If there is no editor/quick-reply element available, bail out of the quote-click JS handler early.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom