From 2ebfa6fb116170f8aef948898513185c6def3977 Mon Sep 17 00:00:00 2001 From: Tom Grobbe <31419184+TomGrobbe@users.noreply.github.com> Date: Mon, 28 Aug 2017 21:49:15 +0200 Subject: [PATCH] Fixed a bug which disabled scrolling. Fixed a bug where the PageUp & PageDown keys would not scroll the text chat up or down. A bug report & the solution that I've just applied can be found here: https://forum.fivem.net/t/chat-scrolling-using-pageup-pagedown-keys-is-broken-solution-provided/43063 --- resources/[system]/chat/html/App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/[system]/chat/html/App.js b/resources/[system]/chat/html/App.js index 3fcd3a0..7cb1fbb 100644 --- a/resources/[system]/chat/html/App.js +++ b/resources/[system]/chat/html/App.js @@ -105,11 +105,11 @@ window.APP = { e.preventDefault(); this.moveOldMessageIndex(e.which === 38); } else if (e.which == 33) { - const buf = $(this.$refs.messages); - buf.scrollTop(buf.scrollTop() - 50); + var buf = document.getElementsByClassName('chat-messages')[0]; + buf.scrollTop = buf.scrollTop - 100; } else if (e.which == 34) { - const buf = $(this.$refs.messages); - buf.scrollTop(buf.scrollTop() + 50); + var buf = document.getElementsByClassName('chat-messages')[0]; + buf.scrollTop = buf.scrollTop + 100; } }, moveOldMessageIndex(up) {