Skip to content

Commit

Permalink
fix: #12062, relax blockquote selector
Browse files Browse the repository at this point in the history
so it works with plugins like lightgallery that wrap post/content
  • Loading branch information
barisusakli committed Oct 6, 2023
1 parent d25a24f commit 99bdad8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/src/client/topic/posts.js
Expand Up @@ -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>');
Expand Down

0 comments on commit 99bdad8

Please sign in to comment.