Opened 10 years ago

Closed 9 years ago

#487 closed Bug (fixed)

Click and drag resizing photos in IE7 doesn't...

Reported by: benji Owned by:
Priority: Normal Milestone: FCKeditor 2.4.3
Component: General Version: FCKeditor 2.4
Keywords: Confirmed IE Cc:


When you insert a photo in IE 7 and resize the photo using the Image Properties windows, it works fine.

When you resize a photo by clicking on it and dragging one of the boxes, it adds stye="width: 100px; height: 100px;" to the image code and doesn't adjust the height and width variables...

When you save the page, it removes the style and leaves the image the same size.

Change History (12)

comment:1 Changed 10 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.4.3

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

Keywords: Pending added

I've tested it in IE7 and the styles aren't removed when switching to source mode or sending the content back to the server.

Could it be something on your side?

comment:3 Changed 10 years ago by benji

I'm not sure if you understand what I mean. You mentioned "the styles aren't removed when switching to source mode or sending the content back to the server"... That's exactly the problem.

When you resize a photo it adds style="height: *px; width: *px;"... It's not my end. I just tested the demo on the fckeditor website and this is what happened when I inserted an image and resized it:

<img style="width: 56px; height: 74px" height="115" alt="" width="100" src="" />

comment:4 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Yes, resizing an image in IE automatically sets the dimensions with the styles, but why is that behavior a bug?

comment:5 Changed 10 years ago by benji

When you save the page and then edit the code again using FCK Editor, it seems to remove the style="width: 56px; height: 74px" and leaves the height="115" width="100" which means that the picture stays the same height and width as when you inserted it.

The only way to get it to stick is to open the image properties dialog and edit the dimensions there.

Hopefully I'm making sense.

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

Saving or loading again the content doesn't remove any styles in my tests, that would be a big bug because there's lots of things besides the dimensions that can go in the styles, so that's why am I asking if this could be something in your side that it's removing the styles.

comment:7 Changed 10 years ago by benji

In your tests, did the image tag include a style="height: *; width: *;" and the height="" and width="" after saving? That's the real problem, it adds the style tag and doesn't adjust the height="" and width="" tags...

comment:8 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: Confirmed IE added; Pending removed
Milestone: FCKeditor 2.4.3

I've just tested it and I can confirm that the bug doesn't exist, with the steps you have provided.

I was instead be able to reproduce it in a very specific situation, which I believe is your case:

  1. Insert an image with "width" and "height" defined.
  2. Change its dimensions, using the size handlers. At this point, element will have the old "width" and "height" and the modified size will be set by using "style". You may check it in the source view.
  3. Click on the image and open "Image Properties". You will see that the dialog has taken the width and height from "style" instead of the normal attributes. This is expected, as the styles override them, and it was confusing for end users to have the dimensions set on two different places in the dialog. Note that the image will get the previous dimension in the editing area instead (here is the bug).
  4. Click on "Cancel"... the style has been lost. If clicked on "Ok", the dimensions would have been correctly moved to the "width" and "height" attributes.

This is a IE only issue, as FF doesn't change "style" when using the size handlers.

comment:9 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Resolution: fixed
Status: newclosed

Ok. I've fixed that with [339]

comment:10 Changed 10 years ago by benji

You're both legends! Keep up the good work!

comment:11 Changed 9 years ago by Sebastien Valette

Resolution: fixed
Status: closedreopened

Hi! I just found this old bug report, and I think I have a similar problem : resizing images in fckeditor results in:

<img style="width: 56px; height: 74px" src="" />

unfortunately, the style attribute is filtered out by drupal, and the image finally does not have the good size. Directly editing the image size within fckeditor (in the image properties pop-up) works, as the line becomes similar to:

<img height="56" width="74" src="" />

but not resizing with the mouse. Is there a workaround for this?

comment:12 Changed 9 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

Please do not reopen tickets just for discussion. You should use our forums for it instead.

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