Closed tomasmalio closed 4 months ago
Thank you for taking the time to submit an Issue! You should get a response to this issue within one to two days.
Hey @tomasmalio . Right now the terminal is setup so the terminal cursor scrolls into view (so the user always sees the cursor). We may be able to change it so the scroll into view is localized to the terminal container. Feel free to submit a PR for the change.
@tomasmalio This is available in v1.3.0.
HI @jonmbake I'm checking if everything works because right now in my app doesn't work
@tomasmalio What browser are you using? I'm not seeing the behavior you described when testing in Firefox 125.0.3 on MacOs. Created a 1000px height div and a terminal below (off screen). When I load the page, it does not scroll to the terminal:
Also, I should have more closely reviewed the code change... The scroll into view only happens on key press so the code change you made is likely unnecessary. I suspect maybe the browser you are testing in auto-scrolls to focused input on page load; the issue is likely with the autoFocus={ onInput != null }
bit.
Hi @jonmbake, I'm testing in MacOS with Chrome 124.0.6367.119.
I tried to do it with the autoFocus, but it also goes to the terminal. I'm trying to understand why.
@jonmbake I have tried multiple ways, but I have not succeeded. Keep scrolling. I have developed a platform with react js, and when it initializes, it directs me to where the terminal is.
@tomasmalio Is your platform/website publicly accessible? Can you email me the URL? I would like to take a look at the behavior. I'm not able to reproduce it locally.
Also, did you try disabling autofocus
from the terminal code? Did it have an effect?
Hi @jonmbake, I've shared with you by mail the URL in which I uploaded the website.
Describe the bug I'm creating a platform with the terminal, and I'd include the component at the bottom of the website when we enter the first time the platform scrolls to the position of the terminal. I tried to fixed with the
overflow-anchor: none
but didn't work.To Reproduce Steps to reproduce the behavior:
react-terminal-ui
Expected behavior I don't want this to automatically scroll to the terminal. How can I configure it to avoid this?