Libbum / oration

A Rocket/Elm self hosted commenting system for static sites
MIT License
22 stars 5 forks source link

Scroll into view #70

Open Libbum opened 6 years ago

Libbum commented 6 years ago

68 was merged without the inclusion of one cosmetic feature: scrolling the comment in question into view if it's outside the viewing pane. Seems like Elm doesn't have native capacity to do this, so will need to port out to js to get this done. However, it's not as straightforward as calling document.getElementById(myId).scrollIntoView() from app.js, something more in line with what Dom.Scroll does is needed.

Libbum commented 6 years ago

el.scrollIntoView({behavior:"smooth"}); may give us smooth animations in some browsers. info