Opened 17 years ago
Closed 13 years ago
#1482 closed Bug (wontfix)
IsDirty always true after loading content with anchors
Reported by: | Rowen | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.4.3 |
Keywords: | Cc: |
Description
On calling SetHTML/SetData with content containing an anchor, the isdirty flag is true even when resetDirtyFlag is passed as true. The reason appears to be that the onSetHTML event fires after the dirty flag is reset, which in turn calls process and processes the targets adding the 'FCKAnchorC' cssclass.
1: call setHTML (now appears to be setData) with sample content containing an anchor (e.g. <p>L<a href="#Fred">in</a>k2</p><p>P<a name="Fred">Fred</a></p>and resetIsDirty = true. 2: check to see if the fck editor isDirty flag is false.
A suggested solution is to modify the function '_FCK_EditingArea_OnLoad', and move the 'ResetIsDirty()' call to after the 'OnAfterSetHTML()' call.
function _FCK_EditingArea_OnLoad() {
Get the editor's window and document (DOM) FCK.EditorWindow = FCK.EditingArea.Window ; FCK.EditorDocument = FCK.EditingArea.Document ;
FCK.InitializeBehaviors() ;
Create the enter key handler if ( !FCKConfig.DisableEnterKeyHandler )
FCK.EnterKeyHandler = new FCKEnterKey( FCK.EditorWindow, FCKConfig.EnterMode, FCKConfig.ShiftEnterMode ) ;
Listen for keystroke events. FCK.KeystrokeHandler.AttachToElement( FCK.EditorDocument ) ;
This is a tricky thing for IE. In some cases, even if the cursor is blinking in the editing, the keystroke handler doesn't catch keyboard events. We must activate the editing area to make it work. (#142). if ( FCKBrowserInfo.IsIE && FCK.HasFocus )
FCK.EditorDocument.body.setActive() ;
FCK.OnAfterSetHTML() ;
moved to after OnAfterSetHTML so that anchor processing does not dirty content
if ( FCK._ForceResetIsDirty )
FCK.ResetIsDirty() ;
Check if it is not a startup call, otherwise complete the startup. if ( FCK.Status != FCK_STATUS_NOTLOADED )
return ;
FCK.SetStatus( FCK_STATUS_ACTIVE ) ;
}
Attachments (1)
Change History (7)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
IsDirty also always returns true if the html contains lists.
Tested in nightly with ie6.
comment:3 Changed 17 years ago by
Version: | FCKeditor 2.4.3 → FCKeditor 2.6.3 Beta |
---|
Adjusted the version so it won't be forgotten :)
comment:4 Changed 17 years ago by
Version: | FCKeditor 2.6.3 Beta → FCKeditor 2.4.3 |
---|
The version field is used to indicate the oldest version this bug has been confirmed on.
Changed 16 years ago by
Attachment: | 1482.patch added |
---|
comment:6 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
FCKeditor was retired and is no longer supported. All active development was moved to its successor, CKEditor 3.x, that is a fully mature and far superior product. We recommend you upgrade as soon as possible since this issue is no longer a problem in current code base.
fyi: I'm using Windows vista,IE7 and windows xp, IE6