From a2e09c950d8716346b151f7980df1b51ebfbdd78 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 15 Apr 2014 12:35:33 -0400
Subject: [PATCH] Use methods chaining, don't use deprecated row_init method

---
 program/js/tiny_mce/plugins/table/editor_plugin_src.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/program/js/tiny_mce/plugins/table/editor_plugin_src.js b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
index 54bab56..0456483 100644
--- a/program/js/tiny_mce/plugins/table/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
@@ -166,7 +166,7 @@
 
 					// Add something to the inner node
 					if (curNode)
-						curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
+						curNode.innerHTML = tinymce.isIE && !tinymce.isIE11 ? '&nbsp;' : '<br data-mce-bogus="1" />';
 
 					return false;
 				}
@@ -179,7 +179,7 @@
 			if (formatNode) {
 				cell.appendChild(formatNode);
 			} else {
-				if (!tinymce.isIE)
+				if (!tinymce.isIE || tinymce.isIE11)
 					cell.innerHTML = '<br data-mce-bogus="1" />';
 			}
 
@@ -566,6 +566,10 @@
 		};
 
 		function pasteRows(rows, before) {
+			// If we don't have any rows in the clipboard, return immediately
+			if(!rows)
+				return;
+
 			var selectedRows = getSelectedRows(),
 				targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
 				targetCellCount = targetRow.cells.length;
@@ -1245,7 +1249,7 @@
 
 					if (last && last.nodeName == 'TABLE') {
 						if (ed.settings.forced_root_block)
-							ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />');
+							ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE && !tinymce.isIE11 ? '&nbsp;' : '<br data-mce-bogus="1" />');
 						else
 							ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
 					}
@@ -1294,7 +1298,10 @@
 
 				/**
 				 * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
+				 *
+				 * Removed: Since the new enter logic seems to fix this one.
 				 */
+				/*
 				if (tinymce.isGecko) {
 					ed.onKeyDown.add(function(ed, e) {
 						if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
@@ -1307,7 +1314,7 @@
 						}
 					});
 				}
-
+				*/
 
 				fixTableCaretPos();
 				ed.startContent = ed.getContent({format : 'raw'});

--
Gitblit v1.9.1