mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Scroll to bottom of modal on open and message send
This commit is contained in:
@@ -40,6 +40,9 @@ export class KhojChatModal extends Modal {
|
||||
.setClass("khoj-chat-input-button")
|
||||
.setCta()
|
||||
.onClick(async () => { await this.getChatResponse(this.result) }));
|
||||
|
||||
// Scroll to bottom of modal, till the send message input box
|
||||
this.modalEl.scrollTop = this.modalEl.scrollHeight;
|
||||
}
|
||||
|
||||
generateReference(messageEl: any, reference: string, index: number) {
|
||||
@@ -81,6 +84,9 @@ export class KhojChatModal extends Modal {
|
||||
text: `${message}`
|
||||
})
|
||||
|
||||
// Scroll to bottom after inserting chat messages
|
||||
this.modalEl.scrollTop = this.modalEl.scrollHeight;
|
||||
|
||||
return chat_message_el
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user