Opened 10 years ago

Closed 9 years ago

#798 closed Bug (fixed)

Image inside floating DIV looses selection with Context Menu

Reported by: cinzia62@… Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.6.4
Component: General Version: FCKeditor 2.5
Keywords: SF Confirmed IE Review+ Cc: fredck


If you add an image into a Div then you apply a style to the div like this <div style="float:right"><img ...> </div> if then you select the image and get the properties, it appears that all the properties are lost. But if you go to the source code you can see that they are not lost. Following the source code with debugger, I noticed that this instruction in fck_image.js

var oImage = FCK.Selection.GetSelectedElement() ;

Moved from SF:

return an undefined element. I have tested it with IE6 on WinXP e win2003.

Attachments (1)

798.patch (2.9 KB) - added by alfonsoml 9 years ago.
Proposed patch

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by martinkou

  • Reporter changed from martinkou to cinzia62@…

comment:2 Changed 10 years ago by martinkou

  • Cc fredck added

It happens only when opening the image properties dialog by using the context menu. The image toolbar button instead works correctly.

Moved from SF. Original poster: fredck

comment:3 Changed 9 years ago by w.olchawa

  • Keywords Confirmed IE added
  • Version set to SVN

FF2 - works fine

IE - image properties doesn't show using the toolbar button as well as from the context menu.

Tested on 2.5 SVN Build 18185

comment:4 Changed 9 years ago by w.olchawa

#1910 has been marked as DUP

comment:5 Changed 9 years ago by fredck

It looks like an IE bug. It returns "none" for document.selection.type in such cases. I'm not sure we have much to do here.

comment:6 Changed 9 years ago by alfonsoml

  • Version changed from SVN to FCKeditor 2.5

Note: I've opened a new ticket for the cases non related to the context menu as #2495

comment:7 Changed 9 years ago by alfonsoml

  • Owner set to alfonsoml
  • Status changed from new to assigned

The problem is caused by the FCK.Focus() call in FCK_ContextMenu_OnItemClick (fck_contextmenu.js). Disabling it makes the dialog work correctly (of course it might break other things, so some further research is needed to verify how to properly fix this)

Changed 9 years ago by alfonsoml

Proposed patch

comment:8 Changed 9 years ago by alfonsoml

  • Keywords Review? added

The patch does remove the Focus call only for IE, due to the usage of popups it seems that it isn't necessary and the problem is fixed, but anyway the patch for #2495 is also needed here, so I've included also in the patch to make it easier to test it.

comment:9 Changed 9 years ago by martinkou

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

comment:10 Changed 9 years ago by alfonsoml

  • Resolution set to fixed
  • Status changed from assigned 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