Fixed some scrolling issues when opening terminal
This commit is contained in:
parent
29b9fce07d
commit
3a4cf93bcc
@ -298,7 +298,9 @@ textToLeetAdvanced(text) {
|
||||
this.appendChild(this.uploadButton);
|
||||
|
||||
this.textarea.addEventListener("blur", () => {
|
||||
this.updateFromInput("");
|
||||
this.updateFromInput(this.value, true).then(
|
||||
this.updateFromInput("")
|
||||
)
|
||||
});
|
||||
|
||||
this.subscribe("file-uploads-done", (data)=>{
|
||||
@ -417,7 +419,7 @@ textToLeetAdvanced(text) {
|
||||
|
||||
|
||||
|
||||
updateFromInput(value) {
|
||||
updateFromInput(value, isFinal = false) {
|
||||
|
||||
this.value = value;
|
||||
|
||||
@ -425,7 +427,7 @@ textToLeetAdvanced(text) {
|
||||
|
||||
if (this.liveType && value[0] !== "/") {
|
||||
const messageText = this.replaceMentionsWithAuthors(value);
|
||||
this.messageUid = this.sendMessage(this.channelUid, messageText, !this.liveType);
|
||||
this.messageUid = this.sendMessage(this.channelUid, messageText, !this.liveType || isFinal);
|
||||
return this.messageUid;
|
||||
}
|
||||
}
|
||||
|
@ -191,9 +191,9 @@ class MessageList extends HTMLElement {
|
||||
}
|
||||
scrollToBottom(force = false, behavior= 'smooth') {
|
||||
if (force || this.isScrolledToBottom()) {
|
||||
this.firstElementChild.scrollIntoView({ behavior, block: 'end' });
|
||||
this.firstElementChild.scrollIntoView({ behavior, block: 'start' });
|
||||
setTimeout(() => {
|
||||
this.firstElementChild.scrollIntoView({ behavior, block: 'end' });
|
||||
this.firstElementChild.scrollIntoView({ behavior, block: 'start' });
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ app.starField.renderWord("H4x0r 1337")
|
||||
{% endif %}
|
||||
|
||||
|
||||
document.addEventListener("keydown", async() => {
|
||||
document.addEventListener("keydown", async(event) => {
|
||||
if(prevKey == "Escape"){
|
||||
document.querySelector("chat-input").querySelector("textarea").value = "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user