Fossil SCM

chat: fixed mis-scroll when toggling chat-only mode. Re-re-introduced the img preview size cap.

stephan 2020-12-27 07:03 trunk
Commit b09f7e990d5cc599dbfdda649068186c36acddedd0dab7a56ffa7327247930cb
2 files changed -2 +6 -1
--- src/chat.js
+++ src/chat.js
@@ -191,12 +191,10 @@
191191
document.body.scroll(0,document.body.height);
192192
}else{
193193
D.removeClass(f.elemsToToggle, 'hidden');
194194
D.removeClass(document.body, 'chat-only-mode');
195195
}
196
- const msg = document.querySelector('.message-widget');
197
- if(msg) setTimeout(()=>msg.scrollIntoView(),0);
198196
ForceResizeKludge();
199197
return this;
200198
},
201199
toggleChatOnlyMode: function(){
202200
return this.chatOnlyMode(!this.isChatOnlyMode());
203201
--- 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 @@
16611661
display: flex;
16621662
flex-direction: column;
16631663
padding: 0.5em 1em;
16641664
border-bottom: none;
16651665
border-top: 1px solid black;
1666
- margin-bottom: 0;
1666
+ margin-bottom: 0.25em;
16671667
margin-top: 0.5em;
16681668
position: initial /*sticky currently disabled due to scrolling-related issues*/;
16691669
bottom: 0;
16701670
}
16711671
/* Widget holding the chat message input field, send button, and
@@ -1720,5 +1720,10 @@
17201720
padding: 0.5em 1em;
17211721
margin-left: 0.5em;
17221722
white-space: pre;
17231723
font-family: monospace;
17241724
}
1725
+
1726
+body.chat #chat-drop-details img {
1727
+ max-width: 45%;
1728
+ max-height: 45%;
1729
+}
17251730
--- 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

Keyboard Shortcuts

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