Fixed an issue where focus doesn't go to the immediate next editable cell after pressing the tab key on switch cell.

This commit is contained in:
Ganesh Jaybhay 2020-03-26 10:50:01 +05:30 committed by Akshay Joshi
parent 17d0d5e0a2
commit 4c0b229b14

View File

@ -717,7 +717,11 @@ define([
gotoCell = e.shiftKey ? self.$el.prev() : self.$el.next();
}
if (gotoCell) {
if (gotoCell && gotoCell.length > 0) {
if(gotoCell.hasClass('editable')){
e.preventDefault();
e.stopPropagation();
}
let command = new Backgrid.Command({
key: 'Tab',
keyCode: 9,
@ -727,12 +731,8 @@ define([
setTimeout(function() {
// When we have Editable Cell
if (gotoCell.hasClass('editable') && gotoCell.hasClass('edit-cell')) {
e.preventDefault();
e.stopPropagation();
gotoCell.trigger('focus');
} else if (gotoCell.hasClass('editable')) {
e.preventDefault();
e.stopPropagation();
setTimeout(function() {
self.model.trigger('backgrid:edited', self.model,
self.column, command);