A platform for community discussion. Free, open, simple.
FIX: removes stored scroll position in drawer (#20328)
Joffrey JAFFEUX7cc0c5946947
diff --git a/plugins/chat/assets/javascripts/discourse/components/channels-list.js b/plugins/chat/assets/javascripts/discourse/components/channels-list.jsindex 9cac0ff735e..bb1b660ebcb 100644--- a/plugins/chat/assets/javascripts/discourse/components/channels-list.js+++ b/plugins/chat/assets/javascripts/discourse/components/channels-list.js@@ -84,12 +84,20 @@ export default class ChannelsList extends Component {@actionstoreScrollPosition() {+ if (this.chatStateManager.isDrawerActive) {+ return;+ }+const scrollTop = document.querySelector(".channels-list")?.scrollTop || 0;this.session.channelsListPosition = scrollTop;}@bind_applyScrollPosition() {+ if (this.chatStateManager.isDrawerActive) {+ return;+ }+const position = this.chatStateManager.isFullPageActive? this.session.channelsListPosition || 0: 0;