Skip to content

Commit

Permalink
Merge branch 't/8916'
Browse files Browse the repository at this point in the history
  • Loading branch information
Garry Yao committed Sep 6, 2012
2 parents fd028cc + 62a3b8b commit 18c156a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/dom/elementpath.js
Expand Up @@ -141,7 +141,7 @@ CKEDITOR.dom.elementPath.prototype = {
};
else if ( CKEDITOR.tools.isArray( query ) )
evaluator = function( node ) {
query.indexOf( node.getName() ) > -1;
return query.indexOf( node.getName() ) > -1;
};
else if ( typeof query == 'function' )
evaluator = query;
Expand Down
11 changes: 10 additions & 1 deletion core/editable.js
Expand Up @@ -528,7 +528,16 @@

evt.data.preventDefault();
}

// BACKSPACE/DEL pressed at the start/end of table cell.
else if ( ( parent = path.contains( [ 'td', 'th', 'caption' ] ) ) &&
range.checkBoundaryOfElement( parent, rtl ? CKEDITOR.START : CKEDITOR.END ) ) {
next = parent[ rtl ? 'getPreviousSourceNode' : 'getNextSourceNode' ]( 1, CKEDITOR.NODE_ELEMENT );
if ( next && !next.isReadOnly() && range.root.contains( next ) ) {
range[ rtl ? 'moveToElementEditEnd' : 'moveToElementEditStart' ]( next );
range.select();
evt.data.preventDefault();
}
}
}

}
Expand Down

0 comments on commit 18c156a

Please sign in to comment.