Fossil SCM
chat: fixed mis-scroll when toggling chat-only mode. Re-re-introduced the img preview size cap.
Commit
b09f7e990d5cc599dbfdda649068186c36acddedd0dab7a56ffa7327247930cb
Parent
a1161fa9bd6587f…
2 files changed
-2
+6
-1
-2
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -191,12 +191,10 @@ | ||
| 191 | 191 | document.body.scroll(0,document.body.height); |
| 192 | 192 | }else{ |
| 193 | 193 | D.removeClass(f.elemsToToggle, 'hidden'); |
| 194 | 194 | D.removeClass(document.body, 'chat-only-mode'); |
| 195 | 195 | } |
| 196 | - const msg = document.querySelector('.message-widget'); | |
| 197 | - if(msg) setTimeout(()=>msg.scrollIntoView(),0); | |
| 198 | 196 | ForceResizeKludge(); |
| 199 | 197 | return this; |
| 200 | 198 | }, |
| 201 | 199 | toggleChatOnlyMode: function(){ |
| 202 | 200 | return this.chatOnlyMode(!this.isChatOnlyMode()); |
| 203 | 201 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -191,12 +191,10 @@ | |
| 191 | document.body.scroll(0,document.body.height); |
| 192 | }else{ |
| 193 | D.removeClass(f.elemsToToggle, 'hidden'); |
| 194 | D.removeClass(document.body, 'chat-only-mode'); |
| 195 | } |
| 196 | const msg = document.querySelector('.message-widget'); |
| 197 | if(msg) setTimeout(()=>msg.scrollIntoView(),0); |
| 198 | ForceResizeKludge(); |
| 199 | return this; |
| 200 | }, |
| 201 | toggleChatOnlyMode: function(){ |
| 202 | return this.chatOnlyMode(!this.isChatOnlyMode()); |
| 203 |
| --- src/chat.js | |
| +++ src/chat.js | |
| @@ -191,12 +191,10 @@ | |
| 191 | document.body.scroll(0,document.body.height); |
| 192 | }else{ |
| 193 | D.removeClass(f.elemsToToggle, 'hidden'); |
| 194 | D.removeClass(document.body, 'chat-only-mode'); |
| 195 | } |
| 196 | ForceResizeKludge(); |
| 197 | return this; |
| 198 | }, |
| 199 | toggleChatOnlyMode: function(){ |
| 200 | return this.chatOnlyMode(!this.isChatOnlyMode()); |
| 201 |
+6
-1
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1661,11 +1661,11 @@ | ||
| 1661 | 1661 | display: flex; |
| 1662 | 1662 | flex-direction: column; |
| 1663 | 1663 | padding: 0.5em 1em; |
| 1664 | 1664 | border-bottom: none; |
| 1665 | 1665 | border-top: 1px solid black; |
| 1666 | - margin-bottom: 0; | |
| 1666 | + margin-bottom: 0.25em; | |
| 1667 | 1667 | margin-top: 0.5em; |
| 1668 | 1668 | position: initial /*sticky currently disabled due to scrolling-related issues*/; |
| 1669 | 1669 | bottom: 0; |
| 1670 | 1670 | } |
| 1671 | 1671 | /* Widget holding the chat message input field, send button, and |
| @@ -1720,5 +1720,10 @@ | ||
| 1720 | 1720 | padding: 0.5em 1em; |
| 1721 | 1721 | margin-left: 0.5em; |
| 1722 | 1722 | white-space: pre; |
| 1723 | 1723 | font-family: monospace; |
| 1724 | 1724 | } |
| 1725 | + | |
| 1726 | +body.chat #chat-drop-details img { | |
| 1727 | + max-width: 45%; | |
| 1728 | + max-height: 45%; | |
| 1729 | +} | |
| 1725 | 1730 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1661,11 +1661,11 @@ | |
| 1661 | display: flex; |
| 1662 | flex-direction: column; |
| 1663 | padding: 0.5em 1em; |
| 1664 | border-bottom: none; |
| 1665 | border-top: 1px solid black; |
| 1666 | margin-bottom: 0; |
| 1667 | margin-top: 0.5em; |
| 1668 | position: initial /*sticky currently disabled due to scrolling-related issues*/; |
| 1669 | bottom: 0; |
| 1670 | } |
| 1671 | /* Widget holding the chat message input field, send button, and |
| @@ -1720,5 +1720,10 @@ | |
| 1720 | padding: 0.5em 1em; |
| 1721 | margin-left: 0.5em; |
| 1722 | white-space: pre; |
| 1723 | font-family: monospace; |
| 1724 | } |
| 1725 |
| --- src/default.css | |
| +++ src/default.css | |
| @@ -1661,11 +1661,11 @@ | |
| 1661 | display: flex; |
| 1662 | flex-direction: column; |
| 1663 | padding: 0.5em 1em; |
| 1664 | border-bottom: none; |
| 1665 | border-top: 1px solid black; |
| 1666 | margin-bottom: 0.25em; |
| 1667 | margin-top: 0.5em; |
| 1668 | position: initial /*sticky currently disabled due to scrolling-related issues*/; |
| 1669 | bottom: 0; |
| 1670 | } |
| 1671 | /* Widget holding the chat message input field, send button, and |
| @@ -1720,5 +1720,10 @@ | |
| 1720 | padding: 0.5em 1em; |
| 1721 | margin-left: 0.5em; |
| 1722 | white-space: pre; |
| 1723 | font-family: monospace; |
| 1724 | } |
| 1725 | |
| 1726 | body.chat #chat-drop-details img { |
| 1727 | max-width: 45%; |
| 1728 | max-height: 45%; |
| 1729 | } |
| 1730 |