Skip to content

Commit

Permalink
fix the bug re the link not bringing up the in-app panel
Browse files Browse the repository at this point in the history
  • Loading branch information
SebinSong committed Jun 4, 2024
1 parent a35504b commit 3e04d6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/views/containers/chatroom/MessageBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ export default ({
this.$refs.messageAction.$refs.menu.handleTrigger()
},
longPressHandler (e) {
const targetEl = e.target
if (targetEl.matches('a.link[href]')) {
const url = targetEl.getAttribute('href')
const wrappingLinkTag = e.target.closest('a.link[href]')
if (wrappingLinkTag) {
const url = wrappingLinkTag.getAttribute('href')
sbp('okTurtles.events/emit', OPEN_TOUCH_LINK_HELPER, url)
e?.preventDefault()
} else {
this.openMenu()
}
Expand Down

0 comments on commit 3e04d6e

Please sign in to comment.