Skip to content
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

Scrolling is transfered between tabs #1267

Closed
erf opened this issue Dec 25, 2018 · 8 comments
Closed

Scrolling is transfered between tabs #1267

erf opened this issue Dec 25, 2018 · 8 comments

Comments

@erf
Copy link

erf commented Dec 25, 2018

If i scroll in one tab and change to a new tab, the new view will continue to scroll ( if enough history in view ). This seem unintentional. I would expect scroll state is kept per tab.

@Luflosi
Copy link
Contributor

Luflosi commented Dec 26, 2018

Tell us more about your environment please. Which OS and kitty version are you using?

@erf
Copy link
Author

erf commented Dec 26, 2018

macOS 10.14.1 (18B75)
kitty 0.13.1 ( build from latest b4b2207 )

@kovidgoyal
Copy link
Owner

How are you scrolling? keyboard, mouse, touchpad? And how are you switching tabs?

@erf
Copy link
Author

erf commented Dec 26, 2018

I'm using the touchpad on my macbook pro, and i'm using a keyboard shortcut cmd+j to switch tabs.

@kovidgoyal
Copy link
Owner

I am guessing this is because of momentum scrolling? The OS will keep
sending scroll events even when the user is not touching the trackpad for
a little while. Is that correct?

@erf
Copy link
Author

erf commented Dec 26, 2018

That is correct.

@Luflosi
Copy link
Contributor

Luflosi commented Dec 26, 2018

Looks like Firefox had this bug too: https://bugzilla.mozilla.org/show_bug.cgi?id=574663
I haven't figured out how to fix this yet. We probably either need to tell the OS to stop the momentum phase when switching tabs or we need to distinguish the "real" scroll events from "fake" ones and stop scrolling if we only get "fake" ones after switching tabs.

@kovidgoyal
Copy link
Owner

I've already made a commit that makes this easy to fix: fc5e74e

Just need to track the current window id when momentum scrolling starts,
and if the window id changes ignore the scroll events until momentum
scrolling ends. Feel free to send a PR with that, or I will get to it
when I have a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants