hoosierhobbyist / quantum-shell

An experimental terminal emulator for the Atom text editor
MIT License
19 stars 6 forks source link

Scrolls to top after command #21

Closed WanderG closed 8 years ago

WanderG commented 8 years ago

I'm on windows 7

Every time I run any command, the window scrolls back to the top

If I, for instance, type dir, to get a long list, then I scroll down all the way, then type cd .., now it has scrolled back all the way to the top again.

hoosierhobbyist commented 8 years ago

The expected behavior for quantum-shell is to scroll all the way to the bottom and display the most recent output after any command is run (even if that command did not produce output). Is this what you are experiencing, or is it the exact opposite? By which I mean it scrolls to the top and you end up seeing the Welcome to Quantum Shell! message again. If so, could you list your Atom version as well as you quantum-shell version? (A gif of what you are experiencing would also be awesome, but not required as I have no idea how to do that myself...) I am unable to reproduce this issue on Windows 8.

WanderG commented 8 years ago

I'm experiencing the opposite of what should happen. The result of commands are added to the bottom, and it scrolls to the top, showing the welcome message.

I'm on Atom 1.2.4, Quantum Shell 0.7.0

I'd make a gif, though I've got no idea how either

I think the problem might be with @activeModel.output.scrollTop = Infinity

When I use $('#quantum-shell-body pre').scrollTop = Infinity in the console, it doesn't scroll to the bottom either, but when I change Infinity to 999999, it does.

hoosierhobbyist commented 8 years ago

This is very strange, I was unable to reproduce this issue last time on Windows 8 but today I am experiencing the same error. My guess would be that a recent change in Atom is the root of this and that mine has only just updated. Unfortunately, I won't have a lot of time to work on it until Wednesday at the earliest. If you don't mind helping me out with some more debugging, would you repeat your experiment with the values -Infinity, Number.MAX_VALUE, and -Number.MAX_VALUE. I'd greatly appreciate it (excellent work on that btw :smiley:)

WanderG commented 8 years ago

I've tried each of those options and Number.MAX_VALUE works like a charm, the other ones don't.

Just did a quick search, and seems this change popped up in the chrome issue tracker in august: https://code.google.com/p/chromium/issues/detail?id=518174

hoosierhobbyist commented 8 years ago

Alright, looking through that thread, this seems to be a very low priority for the chrome dev team. I've changed all the Infinitys to Number.MAX_VALUE and that should be suitable for now. Thank you for you're help on this, I truly appreciate it!