Skip to content

Commit

Permalink
Fixed #843 by restoring tabindex when tabing out of editor
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisPiip committed May 15, 2019
1 parent 87869fb commit 2d86a59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/datatable/BodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export class BodyCell extends Component {

componentDidUpdate() {
if (this.container && this.props.editor) {
clearTimeout(this.tabindexTimeout);
if (this.state.editing) {
let focusable = DomHandler.findSingle(this.container, 'input');
if (focusable) {
Expand All @@ -113,9 +114,9 @@ export class BodyCell extends Component {
this.keyHelper.tabIndex = -1;
}
else {
setTimeout(() => {
this.tabindexTimeout = setTimeout(() => {
if (this.keyHelper) {
this.keyHelper.removeAttribute('tabindex');
this.keyHelper.setAttribute('tabindex', 0);
}
}, 50);
}
Expand Down Expand Up @@ -187,4 +188,4 @@ export class BodyCell extends Component {
</td>
);
}
}
}

0 comments on commit 2d86a59

Please sign in to comment.