Froala editor react scroll bar start position

Ryan Mckenna
Jul 13, 2021

This was for an editable news feed in which the scroll always has to be at the bottom, at the most recent entry into the feed.

Strangely, the editor variable in ‘initialised method’ that has access to the scrollTop (scroll position) and scrollHeight variables could not be used to actually change these variables.

The solution was use the JavaScript window API as seen here.

Important takeaway — Never forget the built in browser window API and other fundamental APIs that underpin JavaScript’s interaction with the browser.

--

--

Ryan Mckenna

Please join on my adventures building applications in the areas of Artifical Intelligence, web and application development!