diff --git a/frontend/src/components/WhatsAppArea.vue b/frontend/src/components/WhatsAppArea.vue index 8ec6b474..88903c26 100644 --- a/frontend/src/components/WhatsAppArea.vue +++ b/frontend/src/components/WhatsAppArea.vue @@ -15,6 +15,7 @@ >
@@ -209,4 +210,15 @@ function messageOptions(message) { // }, ] } + +function scrollToMessage(name) { + const element = document.getElementById(name) + element.scrollIntoView({ behavior: 'smooth' }) + + // Highlight the message + element.classList.add('bg-yellow-100') + setTimeout(() => { + element.classList.remove('bg-yellow-100') + }, 1000) +}