Fossil SCM
Correct a mis-calculation of fontSize for /chat attachments which use the Embed checkbox.
Commit
e3f0dcc325f2f79cb44c2eea70949df9e730553be14cf5aabc677f36a51e8827
Parent
c834adb65651277…
1 file changed
+1
-1
+1
-1
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -1160,11 +1160,11 @@ | ||
| 1160 | 1160 | if(body && !body.style.fontSize){ |
| 1161 | 1161 | /** _Attempt_ to force the iframe to inherit the message's text size |
| 1162 | 1162 | if the body has no explicit size set. On desktop systems |
| 1163 | 1163 | the size is apparently being inherited in that case, but on mobile |
| 1164 | 1164 | not. */ |
| 1165 | - body.style.fontSize = window.getComputedStyle(msgObj.e.content); | |
| 1165 | + body.style.fontSize = window.getComputedStyle(msgObj.e.content).fontSize; | |
| 1166 | 1166 | } |
| 1167 | 1167 | if('' === iframe.style.maxHeight){ |
| 1168 | 1168 | /* Resize iframe height to fit the content. Workaround: if we |
| 1169 | 1169 | adjust the iframe height while it's hidden then its height |
| 1170 | 1170 | is 0, so we must briefly unhide it. */ |
| 1171 | 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); |
| 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 |