Fossil SCM

Correct a mis-calculation of fontSize for /chat attachments which use the Embed checkbox.

stephan 2025-08-17 14:52 trunk
Commit e3f0dcc325f2f79cb44c2eea70949df9e730553be14cf5aabc677f36a51e8827
1 file changed +1 -1
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1160,11 +1160,11 @@
11601160
if(body && !body.style.fontSize){
11611161
/** _Attempt_ to force the iframe to inherit the message's text size
11621162
if the body has no explicit size set. On desktop systems
11631163
the size is apparently being inherited in that case, but on mobile
11641164
not. */
1165
- body.style.fontSize = window.getComputedStyle(msgObj.e.content);
1165
+ body.style.fontSize = window.getComputedStyle(msgObj.e.content).fontSize;
11661166
}
11671167
if('' === iframe.style.maxHeight){
11681168
/* Resize iframe height to fit the content. Workaround: if we
11691169
adjust the iframe height while it's hidden then its height
11701170
is 0, so we must briefly unhide it. */
11711171
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1160,11 +1160,11 @@
1160 if(body && !body.style.fontSize){
1161 /** _Attempt_ to force the iframe to inherit the message's text size
1162 if the body has no explicit size set. On desktop systems
1163 the size is apparently being inherited in that case, but on mobile
1164 not. */
1165 body.style.fontSize = window.getComputedStyle(msgObj.e.content);
1166 }
1167 if('' === iframe.style.maxHeight){
1168 /* Resize iframe height to fit the content. Workaround: if we
1169 adjust the iframe height while it's hidden then its height
1170 is 0, so we must briefly unhide it. */
1171
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1160,11 +1160,11 @@
1160 if(body && !body.style.fontSize){
1161 /** _Attempt_ to force the iframe to inherit the message's text size
1162 if the body has no explicit size set. On desktop systems
1163 the size is apparently being inherited in that case, but on mobile
1164 not. */
1165 body.style.fontSize = window.getComputedStyle(msgObj.e.content).fontSize;
1166 }
1167 if('' === iframe.style.maxHeight){
1168 /* Resize iframe height to fit the content. Workaround: if we
1169 adjust the iframe height while it's hidden then its height
1170 is 0, so we must briefly unhide it. */
1171

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button