vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
9.79k stars 2.47k forks source link

Unable to click copy, upvote, downvote buttons on previous screen #538

Open ayonliu opened 1 week ago

ayonliu commented 1 week ago

When the results are more than one screen, it is not possible to click the copy, upvote, downvote buttons of the previous screen. When you scroll the screen to the previous screen and try to click the copy, upvote or downvote button, the page immediately scrolls to the bottom

2024-11-15 111856

john-dw commented 4 days ago

Hi,

In the use-scroll-to-bottom.ts file, remove attributes and characterData from the observer.

`

  observer.observe(container, {
    childList: true,
    subtree: true,
    // attributes: true,
    // characterData: true,
  });

`

ayonliu commented 20 hours ago

Hi,

In the use-scroll-to-bottom.ts file, remove attributes and characterData from the observer.

`

  observer.observe(container, {
    childList: true,
    subtree: true,
    // attributes: true,
    // characterData: true,
  });

`

@john-dw Thanks a lot. I tried your suggestion, still got the problem.