From 3fb4a36688c5c49fb18004c282c788dc4d6827e9 Mon Sep 17 00:00:00 2001 From: the1812 Date: Tue, 10 Sep 2024 23:03:40 +0800 Subject: [PATCH] Fix fold comment not work for CommentAreaV2 (fix #4905) --- .../lib/components/feeds/fold-comments/fold-comment.scss | 3 +++ registry/lib/components/feeds/fold-comments/index.ts | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/registry/lib/components/feeds/fold-comments/fold-comment.scss b/registry/lib/components/feeds/fold-comments/fold-comment.scss index 66f4b9e91..441e18c0f 100644 --- a/registry/lib/components/feeds/fold-comments/fold-comment.scss +++ b/registry/lib/components/feeds/fold-comments/fold-comment.scss @@ -28,10 +28,13 @@ } } .bili-comment-container { + display: flex !important; + flex-direction: column !important; &.bili-dyn-comment .reply-list { padding-bottom: 8px !important; } .fold-comment { + order: 1; font-size: 13px; } .at-panel, diff --git a/registry/lib/components/feeds/fold-comments/index.ts b/registry/lib/components/feeds/fold-comments/index.ts index 4ddce9bc2..724a77674 100644 --- a/registry/lib/components/feeds/fold-comments/index.ts +++ b/registry/lib/components/feeds/fold-comments/index.ts @@ -32,10 +32,7 @@ const entry = async () => { } if (feedsCardsManager.managerType === 'v2') { const getExistingComment = () => dq(card, commentSelector) as HTMLElement - const isCommentAreaReady = () => { - const existingComment = getExistingComment() - return existingComment !== null && dq(existingComment, 'bili-comments') - } + const isCommentAreaReady = () => getExistingComment() !== null const handler = () => { const button = dq(card, '.bili-dyn-action.comment') as HTMLElement button?.click()