workaround for what looks like a chrome bug

This commit is contained in:
or-else
2021-04-26 19:41:58 -07:00
parent 52ec124cd6
commit 8c5660173c
5 changed files with 13 additions and 5 deletions
+7 -1
View File
@@ -189,7 +189,13 @@ function draftyFormatter(style, data, values, key) {
const dim = fitImageSize(data.width, data.height,
Math.min(this.props.viewportWidth - REM_SIZE * 4, REM_SIZE * 36), REM_SIZE * 24, false) ||
{dstWidth: BROKEN_IMAGE_SIZE, dstHeight: BROKEN_IMAGE_SIZE};
attr.style = { width: dim.dstWidth + 'px', height: dim.dstHeight + 'px' };
attr.style = {
width: dim.dstWidth + 'px',
height: dim.dstHeight + 'px',
// Looks like a Chrome bug.
minWidth: dim.dstWidth + 'px',
minHeight: dim.dstHeight + 'px'
};
if (!Drafty.isProcessing(data)) {
attr.src = this.props.tinode.authorizeURL(sanitizeImageUrl(attr.src));
attr.alt = data.name;
+3 -1
View File
@@ -7135,7 +7135,9 @@ function draftyFormatter(style, data, values, key) {
};
attr.style = {
width: dim.dstWidth + 'px',
height: dim.dstHeight + 'px'
height: dim.dstHeight + 'px',
minWidth: dim.dstWidth + 'px',
minHeight: dim.dstHeight + 'px'
};
if (!tinode_sdk__WEBPACK_IMPORTED_MODULE_2__.Drafty.isProcessing(data)) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long