Opened 17 years ago

Closed 17 years ago

#2057 closed Bug (fixed)

Strange behavior of fix for #1990 (IE selection re-work)

Reported by: Mark Bryson Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.6
Component: UI : Dialogs Version: SVN (FCKeditor) - Retired
Keywords: Confirmed IE Review+ Cc:

Description

It seems like the InsertHtml() function from a floating dialog is getting executed about 10 to 15 times. It is not noticeable using the 'insertbug' plugin as it is attached to #1990. However, if you replace the 'Insert Text' string that gets inserted with content that is taller than the editor window, you can then see the up/down rapid flickering from what appears like multiple re-insertions. Ultimately, it does end up working correctly, but the behavior is strange.

This doesn't happen with FF. However, the ultimate result isn't consistent between FF and IE. With FF, what gets inserted is not selected, but with IE it does end up selected.

SVN build 18515

Attachments (1)

2057.patch (978 bytes) - added by Martin Kou 17 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 17 years ago by Martin Kou

I've done some code tracing with IE6 but I couldn't seem to reproduce the problem. Printing debug messages in FCKDialog.EnsureSelection() indicates that it is executed only once during the FCK.InsertHtml() call.

I performed my tests by modifying the JavaScript code in insertbug.html of the insertbug plugin to the following, to get a very long HTML to insert:

var oEditor = window.parent.InnerDialogLoaded();
var x = [];
var y = '<p>Inserted Text</p>';
for(var i=0;i<100;i++)
        x.push(y);
function InsertText() {
        oEditor.FCK.InsertHtml(x.join(''));
        window.parent.Cancel();
}

comment:2 Changed 17 years ago by Martin Kou

My tests with IE7 also failed to reproduce the issue.

comment:3 Changed 17 years ago by Martin Kou

Keywords: Confirmed IE added

Confirmed, I was able to reproduce the flicker when I put a lot of things into the editing document (long enough that a scrollbar appears) and then run the modified insertbug plugin command.

comment:4 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

Changed 17 years ago by Martin Kou

Attachment: 2057.patch added

comment:5 Changed 17 years ago by Martin Kou

Keywords: Review? added

The bug was caused by FCKSelection.Restore() trying to re-select the editor document after the selection has already been restored. As long as the current selection's parent document is the editor document, FCKSelection.Restore() shouldn't do anything.

comment:6 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:7 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [1818].

Click here for more info about our SVN system.

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