Closed joemasilotti closed 2 years ago
I'd love to tackle this one!
Excellent! All yours.
After investigating, I don't think this was actually working? It looks like it's "scrolling" due to the autofocus: true
on that form. The bug happens when navigating back or forwards in the browser, on a fresh visit it does work (found a related issue https://github.com/hotwired/turbo/issues/354).
I can add an actual fix for scrolling on fresh visits and the typeerro message, but would we consider it a bug when going back or forwards in a browser?
Ex. User is reading their conversations, scrolls up to the middle of the page, goes back a page on the browser, then clicks forward again. Would the user expect it to scroll to the bottom or would a better experience be to have the user land where they were previously?
Nice digging! Back/forward should not scroll to bottom - good call. Only on a fresh visit.
Closed via #521.
Describe the bug
When viewing a conversation the page is supposed to scroll to the bottom. Sometimes, it does not.
To reproduce
Steps to reproduce the behavior:
$ bin/rails db:reset
business@example.com
/password
$ bin/rails console
20.times { Conversation.first.messages.create!(sender: Developer.first, body: "Hi!") }
exit
http://localhost:3000/conversations/1
Expected behavior
The page should scroll to the bottom.
Actual behavior
Sometimes, the page does not scroll to the bottom. The following error can be observed in the web console.
Additional context
I can't nail down what scenario makes this occur every time. Some possibilities:
/conversations