I'm using divRef.current.scrollTop = divRef.current.scrollHeight in my react application to scroll to end of the scrollable div. it's working as expected in chrome but it's not working on safari.
divRef.current.scrollTop = divRef.current.scrollHeight
我还通过添加这一行来解决它:
divRef.current.scrollIntoView(false);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.