Opened 16 years ago

Closed 16 years ago

#2496 closed Bug (fixed)

InsertHtml() ignores current selection in IE. Again.

Reported by: Jon Owned by: Alfonso Martínez de Lizarrondo
Priority: Normal Milestone: FCKeditor 2.6.4
Component: UI : Dialogs Version: FCKeditor 2.6.3
Keywords: IE Confirmed Review+ Cc:

Description

It seems that this bug #2125 has come back again in Version 2.6.3 as I have having troubles with it. You can test this on the demo page with IE. It will insert the text at the start of the box instead of where the cursor is at when you open up the paste dialog.

Attachments (2)

2496.patch (1.2 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
Proposed patch
2496_1.patch (1.2 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
Revised patch

Download all attachments as: .zip

Change History (13)

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

Keywords: IE Confirmed added; ie dialog inserthtml removed

It doesn't seems exactly that the problem is InsertHtml, because the Paste as Plain Text does work properly, so it looks like something else is involved in the dialog itself.

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

I've found that the problem is the fix for #2426, in the paste or paste from word dialog, there's a contentEditable frame, so the new check is true for that situation and the selection isn't restored properly (you can verify also that setting the focus in one of the checkboxes in the Paste from word dialog makes it work properly.

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2496.patch added

Proposed patch

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

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

This patch modifies the Ok function so it moves the focus out of the editing area in any dialog and that way the check added in #2426 will fail

comment:4 Changed 16 years ago by Jon

That patch does help but now it only inserts it at the end of the data even if the cursor is in the middle of some content that is there. The other thing I just noticed is that when you press cancel it doesn't return the cursor to your previous location like it did. I am thinking this is being caused by the contentEditable frame too.

comment:5 in reply to:  4 Changed 16 years ago by Jon

Replying to jwhitcraft:

That patch does help but now it only inserts it at the end of the data even if the cursor is in the middle of some content that is there. The other thing I just noticed is that when you press cancel it doesn't return the cursor to your previous location like it did. I am thinking this is being caused by the contentEditable frame too.

Strike that I was not using text copied out of word and I still had a older cached version of the fckdialog.html code. I still have the problem with the cancel button.

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2496_1.patch added

Revised patch

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

I've changed the location of the changes so it happens whenever the call to Selection.Restore is gonna happen from a dialog.

comment:7 Changed 16 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:8 Changed 16 years ago by Martin Kou

Milestone: FCKeditor 2.6.4

comment:9 Changed 16 years ago by Jon

That last patch does work when you press the cancel button it it doesn't restore the cursor to the previous position or selection when you hit cancel. It instead puts the cursor back at the first position in the editor.

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

Can you please verify that?

Use a the latest nightly with all the latest patches included (maybe some other one of them is also necessary), you might need to wait a little if you aren't using SVN to get the new build. Then apply the 2496_1.patch but you must not have the patch for #2469 included, it does breaks this functionality.

Close all the windows, clear the cache and try again.

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

Resolution: fixed
Status: assignedclosed

I've waited a little but as there is no prove that there's a problem and the patch is working for me I've commited it with [2400].

I've included also a line that I forgot in the patch (it doesn't really affect the fix at hand) that makes the paste as plain text dialog set the focus in the textarea on load.

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