mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #12062, relax blockquote selector
so it works with plugins like lightgallery that wrap post/content
This commit is contained in:
@@ -439,8 +439,10 @@ define('forum/topic/posts', [
|
|||||||
}
|
}
|
||||||
|
|
||||||
Posts.addBlockquoteEllipses = function (posts) {
|
Posts.addBlockquoteEllipses = function (posts) {
|
||||||
const blockquotes = posts.find('[component="post/content"] > blockquote > blockquote');
|
const rootBlockQuotes = posts.find('[component="post/content"] blockquote')
|
||||||
blockquotes.each(function () {
|
.filter((i, el) => !$(el).parent().is('blockquote'));
|
||||||
|
const nestedBlockQuote = rootBlockQuotes.find('>blockquote');
|
||||||
|
nestedBlockQuote.each(function () {
|
||||||
const $this = $(this);
|
const $this = $(this);
|
||||||
if ($this.find(':hidden:not(br)').length && !$this.find('.toggle').length) {
|
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>');
|
$this.append('<i class="d-inline-block fa fa-angle-down pointer toggle py-1 px-3 border text-bg-light"></i>');
|
||||||
|
|||||||
Reference in New Issue
Block a user