Bugfix. Images automatically load in modal

This commit is contained in:
JC Brand 2021-06-23 13:24:05 +02:00
parent 522998bade
commit 3d3242c00d
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export default class MessageBody extends CustomElement {
'embed_audio': this.embed_audio,
'embed_videos': this.embed_videos,
'nick': this.model.collection.chatbox.get('nick'),
'onImgClick': this.onImgClick,
'onImgClick': (ev) => this.onImgClick(ev),
'onImgLoad': () => this.onImgLoad(),
'render_styling': !this.model.get('is_unstyled') && api.settings.get('allow_message_styling'),
'show_images': this.show_images,

View File

@ -113,8 +113,8 @@ export class RichText extends String {
if (this.show_images && isImageURL(url_text) && isImageDomainAllowed(url_text)) {
template = tpl_image({
'url': filtered_url,
'onClick': this.onImgLoad,
'onLoad': this.onImgClick
'onClick': this.onImgClick,
'onLoad': this.onImgLoad
});
} else if (this.embed_videos && isVideoURL(url_text) && isVideoDomainAllowed(url_text)) {
template = tpl_video(filtered_url);