1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

change selection (#2589)

This commit is contained in:
Michael An
2018-12-03 14:13:10 +08:00
committed by Daniel Pan
parent cc7fd1d500
commit cae31a87ec

View File

@@ -254,9 +254,7 @@ class DraftReview extends React.Component {
} }
getSelectedText = () => { getSelectedText = () => {
const value = this.refs.diffViewer.value;
const native = window.getSelection(); const native = window.getSelection();
const { fragment } = value;
const nativeRange = native.getRangeAt(0); const nativeRange = native.getRangeAt(0);
let contents = nativeRange.cloneContents(); let contents = nativeRange.cloneContents();
const div = window.document.createElement('div'); const div = window.document.createElement('div');