Update scrolling for api commands

When you run a command such as `help`, the terminal will automatically scroll down to the bottom of the output and to the next prompt. This doesn't happen for api commands such as `weather Miami`. This PR changes that and matches the api command behavior to the regular ones.
pull/5/head
mjh 2 years ago committed by GitHub
parent 5d649cdbcc
commit fe5e6f4618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,8 @@ const IndexPage: React.FC<IndexPageProps> = ({ inputRef }) => {
React.useEffect(() => {
if (inputRef.current) {
inputRef.current.focus();
inputRef.current.scrollIntoView();
inputRef.current.focus({preventScroll: true});
}
}, [history]);

Loading…
Cancel
Save