Index: /CKEditor/branches/versions/3.1.x/CHANGES.html
===================================================================
--- /CKEditor/branches/versions/3.1.x/CHANGES.html (revision 4625)
+++ /CKEditor/branches/versions/3.1.x/CHANGES.html (revision 4626)
@@ -103,4 +103,5 @@
#4673 : Fixed undo not available straight away if shift key is used to enter first character.
#4690 : Fixed the parsing of nested inline elements.
+ #4621 : Fixed clicking below table cause a empty table been generated.
Index: /CKEditor/branches/versions/3.1.x/_source/core/dom/range.js
===================================================================
--- /CKEditor/branches/versions/3.1.x/_source/core/dom/range.js (revision 4625)
+++ /CKEditor/branches/versions/3.1.x/_source/core/dom/range.js (revision 4626)
@@ -1184,5 +1184,6 @@
blockBoundary,
!blockBoundary.is( 'br' ) &&
- ( !enlargeable || blockBoundary.contains( enlargeable ) ) ?
+ ( !enlargeable && this.checkStartOfBlock()
+ || enlargeable && blockBoundary.contains( enlargeable ) ) ?
CKEDITOR.POSITION_AFTER_START :
CKEDITOR.POSITION_AFTER_END );
@@ -1209,6 +1210,6 @@
this.setEndAt(
blockBoundary,
- !blockBoundary.is( 'br' ) &&
- ( !enlargeable || blockBoundary.contains( enlargeable ) ) ?
+ ( !enlargeable && this.checkEndOfBlock()
+ || enlargeable && blockBoundary.contains( enlargeable ) ) ?
CKEDITOR.POSITION_BEFORE_END :
CKEDITOR.POSITION_BEFORE_START );