Opened 8 years ago

Closed 7 years ago

#3429 closed Bug (fixed)

Editor is unusable with DocType XHTML under IE8

Reported by: duncansimey Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.6.5
Component: General Version: FCKeditor 2.6.4
Keywords: IE8 Review+ Cc:


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" "">' ;

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 alfonsoml 7 years ago.
Proposed patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by duncansimey

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 " ;"

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 7 years ago by duncansimey

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 7 years ago by fredck

  • Keywords IE8 added; xhtml ie8 removed
  • Milestone set to FCKeditor 2.6.5

Changed 7 years ago by alfonsoml

Proposed patch

comment:4 Changed 7 years ago by alfonsoml

  • Keywords Review? added
  • Owner set to alfonsoml
  • Status changed from new to assigned

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

comment:5 Changed 7 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:6 Changed 7 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from assigned to closed

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 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy