Ticket #2396 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

SpellerPages can lead to Permission Denied errors with IE

Reported by: MarkWB Owned by: fredck
Priority: Normal Milestone: FCKeditor 2.6.3
Component: UI : Dialogs Version: SVN (FCKeditor) - Retired
Keywords: Confirmed IE Review+ Cc:

Description (last modified by fredck) (diff)

One set of steps to reproduce with IE7:

  1. Have an anchor tag in content.
  2. Use SpellerPages to correct at least one word.
  3. Press 'Link' button.

You then get Permission Denied error on line 357. This isn't a problem with FF. I've reproduced with IE7 and several FCKeditor versions from SVN back to version 2.4.3.

One way to work around it is to replace the SetHTML() [or SetData()] function in 'fck_spellerpages.html' with:

oEditor.FCK.Commands.GetCommand('SelectAll').Execute();
oEditor.FCK.InsertHtml(document.getElementById('txtHtml').value);

(but with extra prefixed blank paragraph noted by ticket #2395)

I have NOT been able to reproduce by using SetData() in a much simpler, but very similar scenario (plugin) that replaces content containing an anchor tag. So, there seems to be more to causing this than just simply using setData() with content containing an anchor tag.

Attachments

2396.patch (1.9 KB) - added by fredck 6 years ago.

Change History

comment:1 Changed 6 years ago by fredck

  • Status changed from new to assigned
  • Owner set to fredck
  • Description modified (diff)
  • Keywords Confirmed IE added

Changed 6 years ago by fredck

comment:2 Changed 6 years ago by fredck

  • Keywords Review? added

I was able to reproduce the reported problem. I was also having problems by running SpellerPages in the default editor contents of sample01.

The first problem here was that old things were remaining in the TempBin when calling SetData. It was causing the "Permission Denied" error I had because it was trying to access elements from a document that doesn't exist anymore. I've fixed it with the FCKTempBin.Reset() call.

The second problem is the reported issue. The fact is that SpellerPages is using innerHTML to retrieve the editor data, which contains all our "fake stuff". The problem is that we feed it back to the editor with SetData, which creates a new document, the the "fake stuff" references get lost.

To fix it, I've simply used innerHTML to move the data back to the editor, which seems logic and should not cause any undesirable effect.

comment:3 Changed 6 years ago by martinkou

  • Keywords Review+ added; Review? removed

comment:4 Changed 6 years ago by fredck

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

Fixed with [2286].

comment:5 Changed 6 years ago by MarkWB

  • Status changed from closed to reopened
  • Resolution fixed deleted

Wow... That was quick. Do you also think inserting the following line before line 56 is a good idea?

    oEditor.FCKUndo.SaveUndoStep() ;

comment:6 Changed 6 years ago by fredck

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

Yes, that would be a good idea. Please open a dedicated ticket for it, as this ticket has been already committed and released.

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