Skip to content

Commit 18c156a

Browse files
author
Garry Yao
committed
Merge branch 't/8916'
2 parents fd028cc + 62a3b8b commit 18c156a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

core/dom/elementpath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ CKEDITOR.dom.elementPath.prototype = {
141141
};
142142
else if ( CKEDITOR.tools.isArray( query ) )
143143
evaluator = function( node ) {
144-
query.indexOf( node.getName() ) > -1;
144+
return query.indexOf( node.getName() ) > -1;
145145
};
146146
else if ( typeof query == 'function' )
147147
evaluator = query;

core/editable.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,16 @@
528528

529529
evt.data.preventDefault();
530530
}
531-
531+
// BACKSPACE/DEL pressed at the start/end of table cell.
532+
else if ( ( parent = path.contains( [ 'td', 'th', 'caption' ] ) ) &&
533+
range.checkBoundaryOfElement( parent, rtl ? CKEDITOR.START : CKEDITOR.END ) ) {
534+
next = parent[ rtl ? 'getPreviousSourceNode' : 'getNextSourceNode' ]( 1, CKEDITOR.NODE_ELEMENT );
535+
if ( next && !next.isReadOnly() && range.root.contains( next ) ) {
536+
range[ rtl ? 'moveToElementEditEnd' : 'moveToElementEditStart' ]( next );
537+
range.select();
538+
evt.data.preventDefault();
539+
}
540+
}
532541
}
533542

534543
}

0 commit comments

Comments
 (0)