fix: restrict image preview to markdown images

This commit is contained in:
Tim
2025-09-12 10:50:15 +08:00
parent 37bef0b2d7
commit abbdb224e0
3 changed files with 7 additions and 3 deletions

View File

@@ -342,7 +342,7 @@ const copyCommentLink = () => {
const handleContentClick = (e) => {
handleMarkdownClick(e)
if (e.target.tagName === 'IMG') {
if (e.target.tagName === 'IMG' && !e.target.classList.contains('emoji')) {
const container = e.target.parentNode
const imgs = [...container.querySelectorAll('img')].map((i) => i.src)
lightboxImgs.value = imgs