Skip to content

Commit

Permalink
Fix: Return to activate inline editing in Editor would replace the co…
Browse files Browse the repository at this point in the history
…ntents with a new line character immediately.

- Thread 31426
  • Loading branch information
Allan Jardine committed Mar 8, 2016
1 parent 6485082 commit 410685c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions js/dataTables.keyTable.js
@@ -1,11 +1,11 @@
/*! KeyTable 2.1.1
/*! KeyTable 2.1.2-dev
* ©2009-2016 SpryMedia Ltd - datatables.net/license
*/

/**
* @summary KeyTable
* @description Spreadsheet like keyboard navigation for DataTables
* @version 2.1.1
* @version 2.1.2-dev
* @file dataTables.keyTable.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
Expand Down Expand Up @@ -334,6 +334,12 @@ $.extend( KeyTable.prototype, {

orig.stopPropagation();

// Return key should do nothing - for textareas's it would empty the
// contents
if ( key === 13 ) {
orig.preventDefault();
}

editor.inline( this.s.lastFocus.index() );

// Excel style - select all text
Expand Down Expand Up @@ -789,7 +795,7 @@ KeyTable.defaults = {



KeyTable.version = "2.1.1";
KeyTable.version = "2.1.2-dev";


$.fn.dataTable.KeyTable = KeyTable;
Expand Down

0 comments on commit 410685c

Please sign in to comment.