-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly finish scroll animation when using page keys #1244
Conversation
@@ -1306,15 +1306,14 @@ $(function() { | |||
"pagedown" | |||
], function(e, key) { | |||
let container = windows.find(".window.active"); | |||
if (container.is(":animated")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if
should have been lower by the way, so it doesn't really work anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested but looks fine to me.
@YaManicKill, let me know if you want to test it or not and if not I'll do that later, so at least one of us tests it.
@astorije I'm not bothered, I just want one of us to test it. If you get to it first, feel free. I'll let you know if I manage to get some time to do it this evening or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it does owrk, but it goes incredibly quickly. It's probably better than what we have now, but definitely not ideal.
Anything you think can be improved, @xPaw? |
Initially I wanted to get jQuery's animation state, so I could get final scrollTop target, stop the animation and start a new one with adjusted scrollTop, but there jQuery provides no way of doing that. I could be storing scroll data myself to re-use, but I don't know if it's worth it? |
It's probably worth a try, but if this PR already improves things, that's a win IMO. I'm going to merge this as-is, and feel free to attempt something better (but probably more experimental) for a future improvement. Either way, thanks for that! |
Correctly finish scroll animation when using page keys
Fixes #1022.