mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +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")
|
.setClass("khoj-chat-input-button")
|
||||||
.setCta()
|
.setCta()
|
||||||
.onClick(async () => { await this.getChatResponse(this.result) }));
|
.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) {
|
generateReference(messageEl: any, reference: string, index: number) {
|
||||||
@@ -81,6 +84,9 @@ export class KhojChatModal extends Modal {
|
|||||||
text: `${message}`
|
text: `${message}`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Scroll to bottom after inserting chat messages
|
||||||
|
this.modalEl.scrollTop = this.modalEl.scrollHeight;
|
||||||
|
|
||||||
return chat_message_el
|
return chat_message_el
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user