A div content needs to appear at the bottom of the parent element (with overflow-y:scroll set) at all times to ensure that the chat message is up-to-date in the chat box.

question 1. The project is a chat application, which needs to display the latest news in the chat window in real time. Using the scrollIntoView method
id div for bottom, I want to put it at the bottom. As long as it can be displayed, other chat messages can also be displayed on it

.
document.querySelector("-sharpbottom").scrollIntoView();  

results all ieedge,chrome reported errors:

TypeError: Cannot read property "scrollIntoView" of null;//chrome

TypeError: Unable to get property" scrollIntoView" of undefined or
null reference//ieedege

Feb.26,2021

give the parent container a location, and the div with padding,id as bottom absolutely locates to the bottom


render () method is required by the react component, which checks this.props and this.state and returns a React element. We can also return null or false, to indicate that we do not want to have any rendering. The, render () method that cannot get the properties of the corresponding element should be a pure method, that is, it does not modify the component's state, to return the same result each time it is called. It does not interact directly with the browser, if we want to interact, it should be in componentDidMount () or other lifecycle functions.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2baf1-2baa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2baf1-2baa8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?