Skip to content

Commit

Permalink
fix #1701
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Oct 23, 2017
1 parent 2d3c13f commit 17be157
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/TableColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ class TableColumn extends Component {
}

handleCellEdit = e => {
if (this.props.cellEdit.mode === Const.CELL_EDIT_DBCLICK) {
if (document.selection && document.selection.empty) {
document.selection.empty();
} else if (window.getSelection) {
const sel = window.getSelection();
sel.removeAllRanges();
try {
if (this.props.cellEdit.mode === Const.CELL_EDIT_DBCLICK) {
if (document.selection && document.selection.empty) {
document.selection.empty();
} else if (window.getSelection) {
const sel = window.getSelection();
sel.removeAllRanges();
}
}
}
} catch (err) {} /* eslint no-empty: 0 */
this.props.onEdit(
this.props.rIndex + 1, e.currentTarget.cellIndex, e);
if (this.props.cellEdit.mode !== Const.CELL_EDIT_DBCLICK) {
Expand Down

0 comments on commit 17be157

Please sign in to comment.