mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
refactored code
This commit is contained in:
parent
36df3acf4d
commit
e543f55572
@ -512,8 +512,9 @@ export default class MessageComposerInput extends React.Component {
|
||||
// composer. For some reason the editor won't scroll automatically if we paste
|
||||
// blocks of text in or insert newlines.
|
||||
if (textContent.slice(selection.start).indexOf("\n") === -1) {
|
||||
this.refs.editor.refs.editor.parentNode.parentNode.scrollTop = this.
|
||||
refs.editor.refs.editor.parentNode.parentNode.scrollHeight;
|
||||
let editorRoot = this.refs.editor.refs.editor.parentNode.parentNode;
|
||||
console.log(editorRoot, editorRoot.scrollHeight);
|
||||
editorRoot.scrollTop = editorRoot.scrollHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user