Opened 9 years ago

Closed 9 years ago

#2495 closed Bug (fixed)

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

Reported by: alfonsoml Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.6.4
Component: UI : Dialogs Version: FCKeditor 2.6
Keywords: Confirmed IE Review+ Cc:


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 alfonsoml 9 years ago.
Proposed patch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by alfonsoml

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="">FCKeditor</a>.</p>
.<img alt="" src="/fckeditor/editor/images/smiley/msn/regular_smile.gif" /></div>

Changed 9 years ago by alfonsoml

Proposed patch

comment:2 Changed 9 years ago by alfonsoml

  • 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 9 years ago by martinkou

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.


comment:4 Changed 9 years ago by martinkou

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

comment:5 Changed 9 years ago by martinkou

  • Keywords Review+ added; Review? removed
  • Milestone set to FCKeditor 2.6.4

comment:6 Changed 9 years ago by alfonsoml

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

Fixed with [2375]

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