diff --git a/frappe/public/js/frappe/form/controls/table.js b/frappe/public/js/frappe/form/controls/table.js index 62d31a3f7a..e056fe9e07 100644 --- a/frappe/public/js/frappe/form/controls/table.js +++ b/frappe/public/js/frappe/form/controls/table.js @@ -16,25 +16,6 @@ frappe.ui.form.ControlTable = class ControlTable extends frappe.ui.form.Control this.frm.grids[this.frm.grids.length] = this; } const me = this; - this.$wrapper.on("keydown", (e) => { - if (e.which == 9) { - if (e.shiftKey) { - let row_idx = me.set_current_row(e.target); - if (row_idx) { - this.grid.grid_rows[row_idx - 1].toggle_editable_row(true); - } - } else { - if (this.grid.grid_rows.length > 0) { - this.grid.grid_rows[this.grid.grid_rows.length - 1].toggle_editable_row( - true - ); - } else { - this.grid.add_new_row(null, null, true, null, true); - this.grid.grid_rows[0].toggle_editable_row(true); - } - } - } - }); this.$wrapper.on("paste", ":text", (e) => { const table_field = this.df.fieldname; const grid = this.grid; @@ -173,13 +154,4 @@ frappe.ui.form.ControlTable = class ControlTable extends frappe.ui.form.Control check_all_rows() { this.$wrapper.find(".grid-row-check")[0].click(); } - set_current_row(target) { - let current_row = null; - for (let i = 0; i < this.grid.grid_rows.length; i++) { - if (this.grid.grid_rows[i].wrapper.get(0).contains(target)) { - current_row = i + 1; - } - } - return current_row; - } }; diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index 0b3c4623d0..959e720806 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -70,7 +70,7 @@ export default class Grid {