Opened 16 years ago

Closed 16 years ago

#2495 closed Bug (fixed)

Can't get properties of an image inside a div with some styles

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

Description

Some bugs have been marked as dups of #798, because the final situation is the same (and are due to the same internal IE problem), but the fact is that they are different issues.

This problem started after fixing #1990, and it does include a call to set the focus in the editor

FCKSelection.Save = function()
{
	// Ensures the editor has the selection focus. (#1801)
	FCK.Focus() ;

if that call is removed, then this problem goes away, but the context menu still fails, so this is not a dup of #798 as it could be possible to fix it.

Attachments (1)

2495.patch (2.3 KB) - added by Alfonso Martínez de Lizarrondo 16 years ago.
Proposed patch

Download all attachments as: .zip

Change History (7)

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

I forgot, this is of course IE only, and this is some sample code to test the problem:

<div style="border: 1px solid red; height: 30px">
<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
.<img alt="" src="/fckeditor/editor/images/smiley/msn/regular_smile.gif" /></div>

Changed 16 years ago by Alfonso Martínez de Lizarrondo

Attachment: 2495.patch added

Proposed patch

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

Keywords: Review? added

In the patch I've removed the call to set the focus in the editor and wrapped the selection.createRange() call that might fail in a try catch.

As IE only allows to have one selection at a time across all frames, if the editing window isn't currently selected it means that there's nothing to save in this function, so the end result should be the same.

Anyway, given that we are dealing with all the problems about the IE focus here, I would like to please ask for everybody to try this before finding out that now something else is broken.

comment:3 Changed 16 years ago by Martin Kou

Hmm... interesting. I used to think the bug cannot be fixed. Now at least the toolbar button works.

Now I wonder if there's a way to fix it for the context menu as well, though. I'll do some investigations on this after reviewing your other tickets.

Thanks.

comment:4 Changed 16 years ago by Martin Kou

Ok, I can see the context menu issue is fixed as well in the patch to #798. Great. :D

comment:5 Changed 16 years ago by Martin Kou

Keywords: Review+ added; Review? removed
Milestone: FCKeditor 2.6.4

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

Resolution: fixed
Status: newclosed

Fixed with [2375]

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