Fossil SCM

Removed some debug output. When toggling between bottom-up/top-down chat, scroll to the input widget (which flips between the top and the bottom of the page).

stephan 2020-12-26 17:07 trunk
Commit 34547542d2559a35ef85e9678734ba38e220dfd70b9e0ff0ac23c29622f14806
1 file changed +1 -1
+1 -1
--- src/chat.js
+++ src/chat.js
@@ -608,11 +608,10 @@
608608
};
609609
}/*end static init*/
610610
const rect = ev.target.getBoundingClientRect();
611611
const eMsg = ev.target.parentNode/*the owning .message-widget element*/;
612612
f.popup._eMsg = eMsg;
613
- console.debug("eMsg, rect", eMsg, rect);
614613
let x = rect.left, y = rect.topm;
615614
f.popup.show(ev.target)/*so we can get its computed size*/;
616615
if(eMsg.dataset.xfrom===Chat.me
617616
&& document.body.classList.contains('my-messages-right')){
618617
// Shift popup to the left for right-aligned messages to avoid
@@ -661,10 +660,11 @@
661660
boolValue: ()=>document.body.classList.contains('chat-bottom-up'),
662661
callback: function(){
663662
document.body.classList.toggle('chat-bottom-up');
664663
Chat.settings.set('bottom-up',
665664
document.body.classList.contains('chat-bottom-up'));
665
+ Chat.e.inputWrapper.scrollIntoView();
666666
}
667667
},{
668668
label: "Images inline",
669669
boolValue: ()=>Chat.settings.getBool('images-inline'),
670670
callback: function(){
671671
--- src/chat.js
+++ src/chat.js
@@ -608,11 +608,10 @@
608 };
609 }/*end static init*/
610 const rect = ev.target.getBoundingClientRect();
611 const eMsg = ev.target.parentNode/*the owning .message-widget element*/;
612 f.popup._eMsg = eMsg;
613 console.debug("eMsg, rect", eMsg, rect);
614 let x = rect.left, y = rect.topm;
615 f.popup.show(ev.target)/*so we can get its computed size*/;
616 if(eMsg.dataset.xfrom===Chat.me
617 && document.body.classList.contains('my-messages-right')){
618 // Shift popup to the left for right-aligned messages to avoid
@@ -661,10 +660,11 @@
661 boolValue: ()=>document.body.classList.contains('chat-bottom-up'),
662 callback: function(){
663 document.body.classList.toggle('chat-bottom-up');
664 Chat.settings.set('bottom-up',
665 document.body.classList.contains('chat-bottom-up'));
 
666 }
667 },{
668 label: "Images inline",
669 boolValue: ()=>Chat.settings.getBool('images-inline'),
670 callback: function(){
671
--- src/chat.js
+++ src/chat.js
@@ -608,11 +608,10 @@
608 };
609 }/*end static init*/
610 const rect = ev.target.getBoundingClientRect();
611 const eMsg = ev.target.parentNode/*the owning .message-widget element*/;
612 f.popup._eMsg = eMsg;
 
613 let x = rect.left, y = rect.topm;
614 f.popup.show(ev.target)/*so we can get its computed size*/;
615 if(eMsg.dataset.xfrom===Chat.me
616 && document.body.classList.contains('my-messages-right')){
617 // Shift popup to the left for right-aligned messages to avoid
@@ -661,10 +660,11 @@
660 boolValue: ()=>document.body.classList.contains('chat-bottom-up'),
661 callback: function(){
662 document.body.classList.toggle('chat-bottom-up');
663 Chat.settings.set('bottom-up',
664 document.body.classList.contains('chat-bottom-up'));
665 Chat.e.inputWrapper.scrollIntoView();
666 }
667 },{
668 label: "Images inline",
669 boolValue: ()=>Chat.settings.getBool('images-inline'),
670 callback: function(){
671

Keyboard Shortcuts

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