forked from rDrama/rDrama
fix expanded images in chat
parent
c1c6c06547
commit
4615e4138d
|
@ -127,8 +127,6 @@ socket.on('speak', function(json) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let line = document.getElementsByClassName('chat-line')[0].cloneNode(true)
|
let line = document.getElementsByClassName('chat-line')[0].cloneNode(true)
|
||||||
register_new_elements(line);
|
|
||||||
bs_trigger(line)
|
|
||||||
if (last_user == json['user_id']) {
|
if (last_user == json['user_id']) {
|
||||||
box.querySelector('.chat-group:last-child').append(line)
|
box.querySelector('.chat-group:last-child').append(line)
|
||||||
}
|
}
|
||||||
|
@ -138,6 +136,10 @@ socket.on('speak', function(json) {
|
||||||
box.append(chatgroup)
|
box.append(chatgroup)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const line2 = document.getElementById(json['id'])
|
||||||
|
register_new_elements(line2);
|
||||||
|
bs_trigger(line2)
|
||||||
|
|
||||||
if (scrolled_down || json['user_id'] == vid)
|
if (scrolled_down || json['user_id'] == vid)
|
||||||
box.scrollTo(0, box.scrollHeight)
|
box.scrollTo(0, box.scrollHeight)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue