* Fixed bug #7584: htmlArea RTE: pressing TAB in last cell of table should create...
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 19 Feb 2008 05:16:37 +0000 (05:16 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 19 Feb 2008 05:16:37 +0000 (05:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3226 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js

index be54196..683ec68 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-02-19  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
        * Fixed bug #7583: htmlArea RTE should allow to markup text in absence of any block element
+       * Fixed bug #7584: htmlArea RTE: pressing TAB in last cell of table should create new row
 
 2008-02-19  Ingo Renner  <ingo@typo3.org>
 
index 2919cc8..4331f01 100644 (file)
@@ -1,6 +1,7 @@
 2008-02-19  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
        * Fixed bug #7583: htmlArea RTE should allow to markup text in absence of any block element
+       * Fixed bug #7584: htmlArea RTE: pressing TAB in last cell of table should create new row
 
 2008-02-17  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
index 80a5f87..29a1627 100644 (file)
@@ -270,7 +270,11 @@ BlockElements = HTMLArea.Plugin.extend({
                                } else if (tableCell) {
                                        var nextCell = tableCell.nextSibling ? tableCell.nextSibling : (tableCell.parentNode.nextSibling ? tableCell.parentNode.nextSibling.firstChild : null);
                                        if (!nextCell) {
-                                               nextCell = tableCell.parentNode.parentNode.firstChild.firstChild;
+                                               if (this.editor.plugins.TableOperations) {
+                                                       this.editor.plugins.TableOperations.instance.onButtonPress(this.editor, "TO-row-insert-under");
+                                               } else {
+                                                       nextCell = tableCell.parentNode.parentNode.firstChild.firstChild;
+                                               }
                                        }
                                        if (nextCell) {
                                                this.editor.selectNodeContents(nextCell, true);
index 225b8f7..17116c6 100644 (file)
@@ -284,9 +284,8 @@ TableOperations = HTMLArea.Plugin.extend({
                        if (!tr) break;
                        var otr = tr.cloneNode(true);
                        clearRow(otr);
-                       tr.parentNode.insertBefore(otr, (/under/.test(buttonId) ? tr.nextSibling : tr));
-                       editor.forceRedraw();
-                       editor.focusEditor();
+                       otr = tr.parentNode.insertBefore(otr, (/under/.test(buttonId) ? tr.nextSibling : tr));
+                       this.editor.selectNodeContents(otr.firstChild, true);
                        break;
                    case "TO-row-delete":
                        var tr = this.getClosest("tr");