Skip to content

Commit

Permalink
Fixed primefaces#1271 - Setting state in onFocus of Datatable Editors…
Browse files Browse the repository at this point in the history
… crashes app
  • Loading branch information
mertsincan committed Mar 16, 2020
1 parent 96f7920 commit 129e6a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datatable/BodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class BodyCell extends Component {
clearTimeout(this.tabindexTimeout);
if (this.state.editing) {
let focusable = DomHandler.findSingle(this.container, 'input');
if (focusable) {
if (focusable && document.activeElement !== focusable && !focusable.hasAttribute('data-isCellEditing')) {
focusable.setAttribute('data-isCellEditing', true);
focusable.focus();
}
Expand Down

0 comments on commit 129e6a4

Please sign in to comment.