Opened 16 years ago

Closed 16 years ago

#3429 closed Bug (fixed)

Editor is unusable with DocType XHTML under IE8

Reported by: Duncan Simey Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: FCKeditor 2.6.5
Component: General Version: FCKeditor 2.6.4
Keywords: IE8 Review+ Cc:

Description

If the editor area DocType is set to XHTML then it is not possible to drag the scrollbar in the editor area. When the scroll bar is clicked a javascript error occurs; this error prevents the scrollbar from working.

The DocType is specified in our custom configurations file using the following statement: FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' ;

The error details are as follows:

Message: 'nodeName' is null or not an object Line: 457 Char: 2 Code: 0 URI: https://brue/editor/264/v1/fckeditor/editor/_source/internals/fck_ie.js

This line of javascript is:

if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled )

I've worked around this problem by adding an extra guard.

if ( e.nodeName && e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled )

This works for me as we never use FCK to edit web forms. However, a proper solution needs to test the DOM model for an attribute present in IE8 under both HTML and XHTML.

Attachments (1)

3249.patch (1.4 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
Proposed patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 16 years ago by Duncan Simey

Unfortunately the workaround described above is not enough; there are other problems.

If 'Inset/Edit Link' dialog is opened, a URL entered and OK pressed then the dialog fails to close.

Two errors are reported by IE8 as follows: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) Timestamp: Mon, 27 Apr 2009 13:18:03 UTC

Message: Invalid argument. Line: 119 Char: 2 Code: 0 URI: https://brue/editor/264/v1/fckeditor/editor/_source/internals/fckselection_ie.js

Message: Object doesn't support this property or method Line: 794 Char: 1 Code: 0 URI: https://brue/editor/264/v1/fckeditor/editor/fckdialog.html

The first error is in method "FCKSelection.SelectNode = function( node )" on the statement "oRange.select() ;"

The second error is the HTML for the OK button "<input id="btnOk" style="visibility: hidden;" type="button" value="Ok" class="Button" onclick="Ok();" fckLang="DlgBtnOK" />" This has a custom attribute "fckLang", but so does the Cancel button which works fine!

I've tried adding "document.expando = true;" to fckdialog.html which various website indicate might allow custom attributes in XHTML, but it doesn't seem to change the behaviour.

I've done hardly any other testing, so there could also be other problems with 2.6.4 under IE8

comment:2 Changed 16 years ago by Duncan Simey

I found ticket #3181 which has a patch that fixes the two errors in the above comment. NOTE: The 'nodeName' workaround outlined in the original post is still needed.

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: IE8 added; xhtml ie8 removed
Milestone: FCKeditor 2.6.5

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 3249.patch added

Proposed patch

comment:4 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review? added
Owner: set to Alfonso Martínez de Lizarrondo
Status: newassigned

The patch just implements the check suggested as that seems enough to avoid the problem

comment:5 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:6 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: assignedclosed

Fixed with [3550]

The name of the patch and the comments in whatsnew had the bug number altered, but hopefully it's ok now.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy