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

The front page cannot be pulled down #82

Open
White-Friday opened this issue May 2, 2023 · 6 comments
Open

The front page cannot be pulled down #82

White-Friday opened this issue May 2, 2023 · 6 comments

Comments

@White-Friday
Copy link

When the front-end page is full, the complete information cannot be displayed through the pull-down

@staythepath
Copy link

I'm having this problem too, but I'm also having the list index out of range or whatever and I think I have my openai_api_base set wrong. Is it just suppose to be https://api.openai.com if I'm not using any proxy or anything? I can get it to respond with that set as the opan_api_base but I can't scroll down to see the full response.

@SergeyPolud
Copy link
Contributor

@xtekky how to scroll the page?

@staythepath
Copy link

staythepath commented May 2, 2023

In style.css I change this to this:

html,
body {
    scroll-behavior: smooth;
    overflow: auto;
}

then in chat.js I removed every instance of

message_box.scrollTop = message_box.scrollHeight;

and added this EventListener here:

const ask_gpt = async (message) => {
  
  message_box.addEventListener('scroll', function () {
    message_box.scrollTo({ top: message_box.scrollHeight, behavior: "smooth" });
  });

  try {
    message_input.value = ``;
    message_input.innerHTML = ``;
    message_input.innerText = ``;`

This makes the page functional in that I can scroll down now and I can scroll down as the api is responding, but it's definitely not a proper fix. Hopefully someone comes along and does it properly, but for now this is working for me. I'm probably breaking something with this though, because IDK what I'm doing.

@chekamarue
Copy link

chekamarue commented May 3, 2023

1 ) remove overflow from body and keep only html, body { scroll-behavior: smooth; }
2) open chat.js with any editor ! then press ctrl + h and remove all window.scrollTo(0, 0); lines

optionally you can add
window.scrollTo(0, document.body.scrollHeight); to automatically go to bottom page

exemple

message_input.addEventListener("blur", () => { window.scrollTo(0, document.body.scrollHeight); });

you can find updated files in my fork

@SergeyPolud
Copy link
Contributor

you can find updated files in my fork

Yesterday after a couple of hours I resolved the issue both for PC and mobile. You can find changes in my pull request #89

@arm3n
Copy link

arm3n commented May 5, 2023

Super appreciated!

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

5 participants