Merge pull request #14 from TomGrobbe/patch-1

Fixed a bug which disabled scrolling.
This commit is contained in:
リーフストーム
2017-08-28 22:10:21 +02:00
committed by GitHub

View File

@@ -105,11 +105,11 @@ window.APP = {
e.preventDefault(); e.preventDefault();
this.moveOldMessageIndex(e.which === 38); this.moveOldMessageIndex(e.which === 38);
} else if (e.which == 33) { } else if (e.which == 33) {
const buf = $(this.$refs.messages); var buf = document.getElementsByClassName('chat-messages')[0];
buf.scrollTop(buf.scrollTop() - 50); buf.scrollTop = buf.scrollTop - 100;
} else if (e.which == 34) { } else if (e.which == 34) {
const buf = $(this.$refs.messages); var buf = document.getElementsByClassName('chat-messages')[0];
buf.scrollTop(buf.scrollTop() + 50); buf.scrollTop = buf.scrollTop + 100;
} }
}, },
moveOldMessageIndex(up) { moveOldMessageIndex(up) {