Bug #22969 » rtehtmlarea_bugfix_14830_v3_trunk.patch

Administrator Admin, 2010-06-28 21:13

View differences:

typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
1069 1069
	setOptions: function () {
1070 1070
		if (!Ext.isIE) {
1071 1071
			try {
1072
				if (this.document.queryCommandEnabled('insertbronreturn')) {
1073
					this.document.execCommand('insertbronreturn', false, this.config.disableEnterParagraphs);
1072
				if (this.document.queryCommandEnabled('insertBrOnReturn')) {
1073
					this.document.execCommand('insertBrOnReturn', false, this.config.disableEnterParagraphs);
1074 1074
				}
1075 1075
				if (this.document.queryCommandEnabled('styleWithCSS')) {
1076 1076
					this.document.execCommand('styleWithCSS', false, this.config.useCSS);
......
1334 1334
			return false;
1335 1335
		}
1336 1336
		if (event.shiftKey || this.config.disableEnterParagraphs) {
1337
			this.getEditor()._detectURL(event);
1337
			var editor = this.getEditor();
1338
			editor._detectURL(event);
1339
			if (Ext.isSafari) {
1340
				var brNode = editor.document.createElement('br');
1341
				editor.insertNodeAtSelection(brNode);
1342
				brNode.parentNode.normalize();
1343
					// Selection issue when an URL was detected
1344
				if (editor._unlinkOnUndo) {
1345
					brNode = brNode.parentNode.parentNode.insertBefore(brNode, brNode.parentNode.nextSibling);
1346
				}
1347
				if (!brNode.nextSibling || !/\S+/i.test(brNode.nextSibling.textContent)) {
1348
					var secondBrNode = editor.document.createElement('br');
1349
					secondBrNode = brNode.parentNode.appendChild(secondBrNode);
1350
				}
1351
				editor.selectNode(brNode, false);
1352
				event.stopEvent();
1353
			}
1338 1354
		}
1339 1355
			// Update the toolbar state after some time
1340 1356
		this.getToolbar().updateLater.delay(200);
(1-1/2)