Opened 10 years ago

Closed 10 years ago

#3552 closed Bug (duplicate)

FCK Editor 2.6.4 IE8 HTML4 add/edit hyperlink error

Reported by: Harry Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.4
Keywords: Cc:

Description

Descriptive summary:

JavaScript errors appearing when adding a new hyperlink or when editing an existing hyperlink in IE8. The error only occurs when the doctype is set to HTML4 (FCKConfig.DocType).

Steps to reproduce:

It is quite easy to reproduce - edit fckeditor\_samples\html\assets\sample15.config.js and add the line:

FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" "http://www.w3.org/TR/html4/loose.dtd">';

Then run sample 15 and click into the hyperlink. Click the 'edit hyperlink' button. IE8 throws an exception and asks if you want to debug the web page. The error message given is "Invalid Argument".

A simliar error appears if a new link is added, when fck_link.js also calls oEditor.FCKSelection.SelectNode( aLinks[0] ) from function Ok();

Browser name and OS: Bug appears in: IE8, Windows XP or Vista. Bug does not appear: IE6 or IE7. Also does not appear in IE8 with no doctype, a doctype of HTML3.2 or XHTML1/1.1. Only HTML 4!

Fix:

The problem appears to be in fckselection_ie.js, function FCKSelection.SelectNode. I think that if the statements in the try and the catch blocks are swapped round, so that it tries to create a text range first, instead of trying to create a control range first, it won't throw the error. The error is thrown outside of the try/catch block when executing oRange.select().

This bug has not been fixed on the nightly build.

Change History (1)

comment:1 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Resolution: duplicate
Status: newclosed

dup of #3181

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy