mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 22:54:15 +00:00
Fix page scroll glitch
This commit is contained in:
parent
2d9aa35c06
commit
09eaf80f8c
1 changed files with 4 additions and 4 deletions
|
@ -808,7 +808,7 @@ $(function() {
|
|||
|
||||
var input = $("#input")
|
||||
.history()
|
||||
.on("input keyup", function() {
|
||||
.on("input", function() {
|
||||
var style = window.getComputedStyle(this);
|
||||
|
||||
// Start by resetting height before computing as scrollHeight does not
|
||||
|
@ -1312,13 +1312,13 @@ $(function() {
|
|||
container = container.find(".chan.active .chat");
|
||||
}
|
||||
|
||||
const offset = container.get(0).clientHeight * 0.94;
|
||||
const offset = container.get(0).clientHeight * 0.9;
|
||||
let scrollTop = container.scrollTop();
|
||||
|
||||
if (key === "pageup") {
|
||||
scrollTop -= offset;
|
||||
scrollTop = Math.floor(scrollTop - offset);
|
||||
} else {
|
||||
scrollTop += offset;
|
||||
scrollTop = Math.ceil(scrollTop + offset);
|
||||
}
|
||||
|
||||
container.stop().animate({
|
||||
|
|
Loading…
Reference in a new issue