mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
FIX: removes stored scroll position in drawer (#20328)
This commit is contained in:
parent
5720bb7b64
commit
7cc0c59469
@ -84,12 +84,20 @@ export default class ChannelsList extends Component {
|
||||
|
||||
@action
|
||||
storeScrollPosition() {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user