From 50954c333f39c196047ce606416899e8e5886a93 Mon Sep 17 00:00:00 2001 From: Amir Plivatsky Date: Tue, 12 Jul 2011 19:32:44 +0300 Subject: [PATCH] Fixed #12191. --- www/extras/yui-webgui/build/form/datatable.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/extras/yui-webgui/build/form/datatable.js b/www/extras/yui-webgui/build/form/datatable.js index 6d753f9ef..279d8a1bb 100644 --- a/www/extras/yui-webgui/build/form/datatable.js +++ b/www/extras/yui-webgui/build/form/datatable.js @@ -59,11 +59,18 @@ WebGUI.Form.DataTable /************************************************************************ * deleteSelectedRows ( ) * Delete the selected rows after confirming + * If there is an editor in the deleted row, cancel it */ this.deleteSelectedRows = function ( ) { if ( confirm( this.i18n.get( "Form_DataTable", "delete confirm" ) ) ) { var rows = this.dataTable.getSelectedRows(); + + // Cancel editor if present + if ( this.dataTable.getCellEditor() ) { + this.dataTable.cancelCellEditor(); + } + for ( var i = 0; i < rows.length; i++ ) { this.dataTable.deleteRow( this.dataTable.getRecord( rows[i] ) ); }