fix: #12062, relax blockquote selector

so it works with plugins like lightgallery that wrap post/content
This commit is contained in:
Barış Soner Uşaklı
2023-10-06 12:13:40 -04:00
parent d25a24fcf4
commit 99bdad8091

View File

@@ -439,8 +439,10 @@ define('forum/topic/posts', [
}
Posts.addBlockquoteEllipses = function (posts) {
const blockquotes = posts.find('[component="post/content"] > blockquote > blockquote');
blockquotes.each(function () {
const rootBlockQuotes = posts.find('[component="post/content"] blockquote')
.filter((i, el) => !$(el).parent().is('blockquote'));
const nestedBlockQuote = rootBlockQuotes.find('>blockquote');
nestedBlockQuote.each(function () {
const $this = $(this);
if ($this.find(':hidden:not(br)').length && !$this.find('.toggle').length) {
$this.append('<i class="d-inline-block fa fa-angle-down pointer toggle py-1 px-3 border text-bg-light"></i>');