diff --git a/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/RoomListButton.js b/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/RoomListButton.js index 3835311..784ef40 100644 --- a/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/RoomListButton.js +++ b/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/RoomListButton.js @@ -37,6 +37,7 @@ define([ return } + this.mobile = false this.open = false this.sidebar = document.querySelector('.sidebar') @@ -48,6 +49,7 @@ define([ } enableMobile() { + this.mobile = true this.element.parentElement.hidden = false } @@ -57,6 +59,7 @@ define([ } this.element.parentElement.hidden = true + this.mobile = false } show(doShow = true) { @@ -75,6 +78,10 @@ define([ this.roomList.appendChild(this.closeButton) this.roomList.dataset.show = 'true' + + if (this.mobile) { + UiScreen.scrollDisable() + } } else { delete this.roomList.dataset.show @@ -86,6 +93,10 @@ define([ this.sidebar.style.removeProperty('display') this.open = false + + if (this.mobile) { + UiScreen.scrollEnable() + } } } diff --git a/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/UserListButton.js b/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/UserListButton.js index 6061bd9..cf7cb42 100644 --- a/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/UserListButton.js +++ b/files_wcf/js/Bastelstu.be/Chat/Ui/Settings/UserListButton.js @@ -31,6 +31,7 @@ define([ constructor(element, ...superDeps) { super(element, ...superDeps) + this.mobile = false this.open = false this.userList = document.getElementById('chatUserList') this.sidebar = document.querySelector('.sidebar') @@ -43,6 +44,7 @@ define([ } enableMobile() { + this.mobile = true this.element.parentElement.hidden = false } @@ -52,6 +54,7 @@ define([ } this.element.parentElement.hidden = true + this.mobile = false } show(doShow = true) { @@ -70,6 +73,10 @@ define([ this.userList.appendChild(this.closeButton) this.userList.dataset.show = 'true' + + if (this.mobile) { + UiScreen.scrollDisable() + } } else { delete this.userList.dataset.show @@ -81,6 +88,10 @@ define([ this.sidebar.style.removeProperty('display') this.open = false + + if (this.mobile) { + UiScreen.scrollEnable() + } } }