Ticket #798 (closed Bug: fixed)

Opened 3 years ago

Last modified 19 months ago

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

Description

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:
 http://sourceforge.net/tracker/index.php?func=detail&aid=1628785&group_id=75348&atid=543653

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

Attachments

798.patch Download (2.9 KB) - added by alfonsoml 19 months ago.
Proposed patch

Change History

Changed 3 years ago by martinkou

  • reporter changed from martinkou to cinzia62@…

Changed 3 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

Changed 2 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

Changed 2 years ago by w.olchawa

#1910 has been marked as DUP

Changed 22 months 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.

Changed 19 months 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

Changed 19 months 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 19 months ago by alfonsoml

Proposed patch

Changed 19 months 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.

Changed 19 months ago by martinkou

  • keywords Review+ added; Review? removed
  • milestone set to FCKeditor 2.6.4

Changed 19 months ago by alfonsoml

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [2375]

Note: See TracTickets for help on using tickets.