Index: ChangeLog
===================================================================
--- ChangeLog	(révision 7280)
+++ ChangeLog	(copie de travail)
@@ -14,6 +14,7 @@
 	* Added feature #14051: htmlArea RTE: Streamline the RTE loading process
 	* Added feature #14057: htmlArea RTE: Extjize the RTE ajax requests.
 	* Added feature #14058: htmlArea RTE: update some WebKit dom methods.
+	* Added feature #14059: htmlArea RTE: Cleanup use of editor focus method
 
 2010-04-09  Michael Stucki  <michael@typo3.org>
 
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js	(révision 7280)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js	(copie de travail)
@@ -62,8 +62,8 @@
 	} else {
 		selection.removeAllRanges();
 	}
-	if (HTMLArea.is_opera) {
-		this._iframe.focus();
+	if (Ext.isOpera) {
+		this.focus();
 	}
 };
 
@@ -118,7 +118,7 @@
  * Select a node AND the contents inside the node
  */
 HTMLArea.Editor.prototype.selectNode = function(node, endPoint) {
-	this.focusEditor();
+	this.focus();
 	var selection = this._getSelection();
 	var range = this._doc.createRange();
 	if (node.nodeType == 1 && node.nodeName.toLowerCase() == "body") {
@@ -141,7 +141,7 @@
  * Select ONLY the contents inside the given node
  */
 HTMLArea.Editor.prototype.selectNodeContents = function(node, endPoint) {
-	this.focusEditor();
+	this.focus();
 	var selection = this._getSelection();
 	var range = this._doc.createRange();
 	if (Ext.isWebKit) {
@@ -160,7 +160,6 @@
 	this.emptySelection(selection);
 	this.addRangeToSelection(selection, range);
 };
-
 HTMLArea.Editor.prototype.rangeIntersectsNode = function(range, node) {
 	var nodeRange = this._doc.createRange();
 	try {
@@ -181,7 +180,6 @@
 	return (range.compareBoundaryPoints(range.END_TO_START, nodeRange) == -1 && range.compareBoundaryPoints(range.START_TO_END, nodeRange) == 1) ||
 		(range.compareBoundaryPoints(range.END_TO_START, nodeRange) == 1 && range.compareBoundaryPoints(range.START_TO_END, nodeRange) == -1);
 };
-
 /*
  * Get the selection type
  */
@@ -413,7 +411,7 @@
  * Split the text node, if needed.
  */
 HTMLArea.Editor.prototype.insertNodeAtSelection = function(toBeInserted) {
-	this.focusEditor();
+	this.focus();
 	var range = this._createRange(this._getSelection());
 	range.deleteContents();
 	var toBeSelected = (toBeInserted.nodeType === 11) ? toBeInserted.lastChild : toBeInserted;
@@ -426,7 +424,7 @@
  * Delete the current selection, if any.
  */
 HTMLArea.Editor.prototype.insertHTML = function(html) {
-	this.focusEditor();
+	this.focus();
 	var fragment = this._doc.createDocumentFragment();
 	var div = this._doc.createElement("div");
 	div.innerHTML = html;
@@ -539,7 +537,7 @@
  */
 HTMLArea.Editor.prototype._checkInsertP = function() {
 	var editor = this;
-	this.focusEditor();
+	this.focus();
 	var i, left, right, rangeClone,
 		sel	= this._getSelection(),
 		range	= this._createRange(sel),
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-ie.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-ie.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-ie.js	(copie de travail)
@@ -57,7 +57,7 @@
 		var sel = this._getSelection();
 	}
 	if (sel.type.toLowerCase() == "none") {
-		this.focusEditor();
+		this.focus();
 	}
 	return sel.createRange();
 };
@@ -66,7 +66,7 @@
  * Select a node AND the contents inside the node
  */
 HTMLArea.Editor.prototype.selectNode = function(node) {
-	this.focusEditor();
+	this.focus();
 	this.forceRedraw();
 	var range = this._doc.body.createTextRange();
 	range.moveToElementText(node);
@@ -77,7 +77,7 @@
  * Select ONLY the contents inside the given node
  */
 HTMLArea.Editor.prototype.selectNodeContents = function(node, endPoint) {
-	this.focusEditor();
+	this.focus();
 	this.forceRedraw();
 	var range = this._doc.body.createTextRange();
 	range.moveToElementText(node);
@@ -91,7 +91,7 @@
  * Determine whether the node intersects the range
  */
 HTMLArea.Editor.prototype.rangeIntersectsNode = function(range, node) {
-	this.focusEditor();
+	this.focus();
 	var nodeRange = this._doc.body.createTextRange();
 	nodeRange.moveToElementText(node);
 	return (range.compareEndPoints("EndToStart", nodeRange) == -1 && range.compareEndPoints("StartToEnd", nodeRange) == 1) ||
Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js	(copie de travail)
@@ -2778,6 +2778,9 @@
 
 /*
  * Focus the editor iframe window or the textarea.
+ ***********************************************
+ * THIS FUNCTION IS DEPRECATED AS OF TYPO3 4.4 *
+ ***********************************************
  */
 HTMLArea.Editor.prototype.focusEditor = function() {
 	this.focus();
@@ -2786,6 +2789,9 @@
 
 /*
  * Check if any plugin has an opened window
+ ***********************************************
+ * THIS FUNCTION IS DEPRECATED AS OF TYPO3 4.4 *
+ ***********************************************
  */
 HTMLArea.Editor.prototype.hasOpenedWindow = function () {
 	for (var plugin in this.plugins) {
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js	(copie de travail)
@@ -266,7 +266,7 @@
 					if (HTMLArea.is_ie) {
 						element = "<" + element + ">";
 					}
-					this.editor.focusEditor();
+					this.editor.focus();
 					if (HTMLArea.is_safari && !this.editor._doc.body.hasChildNodes()) {
 						this.editor._doc.body.appendChild((this.editor._doc.createElement("br")));
 					}
@@ -294,7 +294,7 @@
 			// Could be a button or its hotkey
 		var buttonId = this.translateHotKey(id);
 		buttonId = buttonId ? buttonId : id;
-		this.editor.focusEditor();
+		this.editor.focus();
 		var selection = editor._getSelection();
 		var range = editor._createRange(selection);
 		var statusBarSelection = this.editor.statusBar ? this.editor.statusBar.getSelection() : null;
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockStyle/block-style.js	(copie de travail)
@@ -145,7 +145,7 @@
 	 */
 	onChange : function (editor, combo, record, index) {
 		var className = combo.getValue();
-		this.editor.focusEditor();
+		this.editor.focus();
 		var blocks = this.getSelectedBlocks();
 		for (var k = 0; k < blocks.length; ++k) {
 			var parent = blocks[k];
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js	(copie de travail)
@@ -106,7 +106,7 @@
 			// Could be a button or its hotkey
 		var buttonId = this.translateHotKey(id);
 		buttonId = buttonId ? buttonId : id;
-		this.editor.focusEditor();
+		this.editor.focus();
 		if (!this.applyToTable(buttonId, target)) {
 				// If we are not handling table cells
 			switch (buttonId) {
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js	(copie de travail)
@@ -90,7 +90,7 @@
 			// Could be a button or its hotkey
 		var buttonId = this.translateHotKey(id);
 		buttonId = buttonId ? buttonId : id;
-		editor.focusEditor();
+		editor.focus();
 		try {
 			editor._doc.execCommand(buttonId, false, null);
 		}
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/DefinitionList/definition-list.js	(copie de travail)
@@ -113,7 +113,7 @@
 			// Could be a button or its hotkey
 		var buttonId = this.translateHotKey(id);
 		buttonId = buttonId ? buttonId : id;
-		this.editor.focusEditor();
+		this.editor.focus();
 		var selection = editor._getSelection();
 		var range = editor._createRange(selection);
 		var statusBarSelection = this.editor.statusBar ? this.editor.statusBar.getSelection() : null;
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TextStyle/text-style.js	(copie de travail)
@@ -162,7 +162,7 @@
 		var classNames = null;
 		var fullNodeSelected = false;
 		
-		this.editor.focusEditor();
+		this.editor.focus();
 		var selection = this.editor._getSelection();
 		var statusBarSelection = this.editor.statusBar ? this.editor.statusBar.getSelection() : null;
 		var range = this.editor._createRange(selection);
Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js
===================================================================
--- typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js	(révision 7279)
+++ typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js	(copie de travail)
@@ -192,7 +192,7 @@
 	 */
 	createLink : function(theLink,cur_target,cur_class,cur_title,additionalValues) {
 		var selection, range, anchorClass, imageNode = null, addIconAfterLink;
-		this.editor.focusEditor();
+		this.editor.focus();
 		this.restoreSelection();
 		var node = this.editor.getParentElement();
 		var el = HTMLArea.getElementObject(node, "a");
@@ -251,7 +251,7 @@
 	* This function is called from the TYPO3 link popup and from the context menu.
 	*/
 	unLink : function() {
-		this.editor.focusEditor();
+		this.editor.focus();
 		this.restoreSelection();
 		var node = this.editor.getParentElement();
 		var el = HTMLArea.getElementObject(node, "a");
