Skip to content

Commit

Permalink
Merge pull request #889 from lino-framework/PR
Browse files Browse the repository at this point in the history
Fixed #843 by restoring tabindex when tabing out of editor
  • Loading branch information
cagataycivici authored May 30, 2019
2 parents 75e56a3 + 2d86a59 commit 8a77215
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 @@ -116,6 +116,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 @@ -126,9 +127,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 @@ -200,4 +201,4 @@ export class BodyCell extends Component {
</td>
);
}
}
}

0 comments on commit 8a77215

Please sign in to comment.