forked from Mirrors/elk
fix(ui): clicking on custom emoji does not navigate to status detail (#2743)
This commit is contained in:
parent
9025416ab3
commit
c6787aae3f
1 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,8 @@ function onclick(evt: MouseEvent | KeyboardEvent) {
|
||||||
const path = evt.composedPath() as HTMLElement[]
|
const path = evt.composedPath() as HTMLElement[]
|
||||||
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
|
const el = path.find(el => ['A', 'BUTTON', 'IMG', 'VIDEO'].includes(el.tagName?.toUpperCase()))
|
||||||
const text = window.getSelection()?.toString()
|
const text = window.getSelection()?.toString()
|
||||||
if (!el && !text)
|
const isCustomEmoji = el?.parentElement?.classList.contains('custom-emoji')
|
||||||
|
if ((!el && !text) || isCustomEmoji)
|
||||||
go(evt)
|
go(evt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue