mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Merge pull request #1682 from Nostradamos/fix_riot_web_4821
Make scroll on paste in RTE compatible with https://github.com/vector-im/riot-web/pull/5900
This commit is contained in:
commit
d3e47fa99d
1 changed files with 2 additions and 1 deletions
|
@ -512,7 +512,8 @@ 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.scrollTop = this.refs.editor.refs.editor.scrollHeight;
|
||||
let editorRoot = this.refs.editor.refs.editor.parentNode.parentNode;
|
||||
editorRoot.scrollTop = editorRoot.scrollHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue