diff --git a/app/client/components/GridView.js b/app/client/components/GridView.js index 6a1afbb2..39a86760 100644 --- a/app/client/components/GridView.js +++ b/app/client/components/GridView.js @@ -299,6 +299,7 @@ GridView.gridCommands = { .finally(() => { this.cursor.setCursorPos(saved); this.cursor.setLive(true); + this.clearSelection(); }) .catch(reportError); }, @@ -719,7 +720,7 @@ GridView.prototype.deleteColumns = function(selection) { let actions = fields.filter(col => !col.disableModify()).map(col => ['RemoveColumn', col.colId()]); if (actions.length > 0) { this.tableModel.sendTableActions(actions, `Removed columns ${actions.map(a => a[1]).join(', ')} ` + - `from ${this.tableModel.tableData.tableId}.`); + `from ${this.tableModel.tableData.tableId}.`).then(() => this.clearSelection()); } }; diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index 5d34c02b..997f1f8f 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -1519,6 +1519,11 @@ export function openRowMenu(rowNum: number) { .then(() => driver.findWait('.grist-floating-menu', 1000)); } +export async function removeRow(rowNum: number) { + await (await openRowMenu(rowNum)).findContent('li', /Delete/).click(); + await waitForServer(); +} + export async function openCardMenu(rowNum: number) { const section = await driver.find('.active_section'); const firstRow = await section.findContent('.detail_row_num', String(rowNum));