Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (révision 6960) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (copie de travail) @@ -336,7 +336,7 @@ var endSpan = this.getBookmarkNode(bookmark, false); var range = this._createRange(); - // If the previous sibling is a text node, let the anchor have it as parent + // If the previous sibling is a text node, let the anchorNode have it as parent if (startSpan.previousSibling && startSpan.previousSibling.nodeType == 3) { range.setStart(startSpan.previousSibling, startSpan.previousSibling.data.length); } else { @@ -345,7 +345,7 @@ HTMLArea.removeFromParent(startSpan); // If the bookmarked range was collapsed, the end span will not be available if (endSpan) { - // If the next sibling is a text node, let the anchor have it as parent + // If the next sibling is a text node, let the focusNode have it as parent if (endSpan.nextSibling && endSpan.nextSibling.nodeType == 3) { range.setEnd(endSpan.nextSibling, 0); } else { @@ -410,18 +410,9 @@ * @return void */ HTMLArea.Editor.prototype.wrapWithInlineElement = function(element, selection, range) { - // Sometimes Opera raises a bad boundary points error - if (HTMLArea.is_opera) { - try { - range.surroundContents(element); - } catch(e) { - element.appendChild(range.extractContents()); - range.insertNode(element); - } - } else { - range.surroundContents(element); - element.normalize(); - } + element.appendChild(range.extractContents()); + range.insertNode(element); + element.normalize(); // Sometimes Firefox inserts empty elements just outside the boundaries of the range var neighbour = element.previousSibling; if (neighbour && (neighbour.nodeType != 3) && !/\S/.test(neighbour.textContent)) {