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).
Commit
34547542d2559a35ef85e9678734ba38e220dfd70b9e0ff0ac23c29622f14806
Parent
fc4782e7ef82d7e…
1 file changed
+1
-1
+1
-1
| --- src/chat.js | ||
| +++ src/chat.js | ||
| @@ -608,11 +608,10 @@ | ||
| 608 | 608 | }; |
| 609 | 609 | }/*end static init*/ |
| 610 | 610 | const rect = ev.target.getBoundingClientRect(); |
| 611 | 611 | const eMsg = ev.target.parentNode/*the owning .message-widget element*/; |
| 612 | 612 | f.popup._eMsg = eMsg; |
| 613 | - console.debug("eMsg, rect", eMsg, rect); | |
| 614 | 613 | let x = rect.left, y = rect.topm; |
| 615 | 614 | f.popup.show(ev.target)/*so we can get its computed size*/; |
| 616 | 615 | if(eMsg.dataset.xfrom===Chat.me |
| 617 | 616 | && document.body.classList.contains('my-messages-right')){ |
| 618 | 617 | // Shift popup to the left for right-aligned messages to avoid |
| @@ -661,10 +660,11 @@ | ||
| 661 | 660 | boolValue: ()=>document.body.classList.contains('chat-bottom-up'), |
| 662 | 661 | callback: function(){ |
| 663 | 662 | document.body.classList.toggle('chat-bottom-up'); |
| 664 | 663 | Chat.settings.set('bottom-up', |
| 665 | 664 | document.body.classList.contains('chat-bottom-up')); |
| 665 | + Chat.e.inputWrapper.scrollIntoView(); | |
| 666 | 666 | } |
| 667 | 667 | },{ |
| 668 | 668 | label: "Images inline", |
| 669 | 669 | boolValue: ()=>Chat.settings.getBool('images-inline'), |
| 670 | 670 | callback: function(){ |
| 671 | 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 | 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 |