The force.
This commit is contained in:
parent
431748c489
commit
a55d15b635
src/snek/static
@ -47,8 +47,12 @@ class ChatInputComponent extends HTMLElement {
|
||||
this.textarea.focus();
|
||||
}
|
||||
|
||||
|
||||
async connectedCallback() {
|
||||
this.user = await app.rpc.getUser(null);
|
||||
this.user = null
|
||||
app.rpc.getUser(null).then((user) => {
|
||||
this.user=user
|
||||
})
|
||||
this.liveType = this.getAttribute("live-type") === "true";
|
||||
this.liveTypeInterval =
|
||||
parseInt(this.getAttribute("live-type-interval")) || 3;
|
||||
@ -152,6 +156,9 @@ class ChatInputComponent extends HTMLElement {
|
||||
});
|
||||
app.rpc.sendMessage(this.channelUid, message);
|
||||
});
|
||||
setTimeout(()=>{
|
||||
this.focus();
|
||||
},1000)
|
||||
}
|
||||
|
||||
trackSecondsBetweenEvents(event1Time, event2Time) {
|
||||
|
@ -19,10 +19,14 @@ class MessageList extends HTMLElement {
|
||||
this.items = [];
|
||||
}
|
||||
scrollToBottom(force) {
|
||||
|
||||
console.info("Scrolling down")
|
||||
// if (force) {
|
||||
this.scrollTop = this.scrollHeight;
|
||||
//this.querySelector(".message-list-bottom").scrollIntoView();
|
||||
//this.scrollTop = this.scrollHeight;
|
||||
|
||||
this.querySelector(".message-list-bottom").scrollIntoView();
|
||||
setTimeout(() => {
|
||||
this.querySelector(".message-list-bottom").scrollIntoView();
|
||||
},200)
|
||||
// }
|
||||
}
|
||||
updateMessageText(uid, message) {
|
||||
|
Loading…
Reference in New Issue
Block a user