Ticket #1648 (closed Bug: fixed)

Opened 2 years ago

Last modified 2 years ago

resizing handles of dragresizetable plugin are created in the fckeditor.html frame

Reported by: alfonsoml Owned by: alfonsoml
Priority: Normal Milestone: FCKeditor 2.6
Component: General Version:
Keywords: Review+ Cc:

Description

Due to  https://bugzilla.mozilla.org/show_bug.cgi?id=130078 that means that the created elements are behind the editing div and aren't visible if we are running in chrome: (write area)

The solution seems to be to use the FCK.EditorDocument to create and position those elements.

Attachments

1648.patch Download (4.2 KB) - added by alfonsoml 2 years ago.
proposal
1648_2.patch Download (4.0 KB) - added by alfonsoml 2 years ago.
updated patch

Change History

Changed 2 years ago by alfonsoml

proposal

Changed 2 years ago by alfonsoml

The proposed patch just factorizes some calls in a way that it's possible to change the behavior of the plugin easily to create the divs in the edited frame. in fact the AfterSetHTML function could be removed and _avoidStyles could be left as an empty function.

Later I just have to call

FCK.Events.AttachEvent( "OnAfterSetHTML", FCKDragTableHandler.AfterSetHTML ) ;
FCKDragTableHandler._GetIframeOffset = function() { return {x:0, y:0}; };
FCKDragTableHandler._GetTablePosition = function( w, table) { return FCKTools.GetDocumentPosition(w, table ) ; };

and that way the code will work only on the edited frame.

The drawback is that the created divs can be affected by the page styles, so doing this for the general core could be troublesome, but just the suggested changes (minus the .AfterSetHTML and leaving _avoidStyles as a dummy will make it possible to include the plugin in Write Area easily.

Thoughts? other approaches?

Changed 2 years ago by alfonsoml

  • keywords Review? added

Changed 2 years ago by martinkou

The plugin works ok after the patch, but it seems to me the "AfterSetHTML()" function added in the patch is not being called?

Changed 2 years ago by alfonsoml

updated patch

Changed 2 years ago by alfonsoml

  • owner set to alfonsoml

You're right.

That function isn't needed in this code, it should be created by the external code that will adjust the other functions.

Changed 2 years ago by martinkou

  • keywords Review+ added; Review? removed

Changed 2 years ago by alfonsoml

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to FCKeditor 2.6

Fixed with [1365]

Note: See TracTickets for help on using tickets.