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 @@
>
scrollToMessage(whatsapp.reply_to)"
class="mb-1 cursor-pointer rounded-md border-0 border-l-4 border-green-500 bg-gray-200 px-2 py-4"
v-html="formatWhatsAppMessage(whatsapp.reply_message)"
/>
@@ -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)
+}