Opened 7 years ago

Last modified 5 years ago

#9759 confirmed Bug

Inconsistency in preview field for images with % heights

Reported by: Teresa Monahan Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IBM Cc: Damian, Satya Minnekanti

Description

To reproduce:

  1. Open the replacebyclass sample in FF/IE/Opera.
  2. Right click on the image and set the width and height to 100%
  3. Repeat steps 1 and 2 in Safari/Chrome.
  4. Compare the preview field in the 2 browsers.

Problem: In Safari and Chrome, the image is skewed and fits exactly in the preview field without scrolling. In FF, IE and Opera, the aspect ratio of the image remains intact and it is necessary to scroll the preview field to see the bottom of the image.

This seems to be a browser issue regarding how % heights are interpreted. Is there anything CKEditor can do to make this consistent across all browsers?

Attachments (4)

img.html (2.2 KB) - added by Jakub Ś 6 years ago.
_img.html (3.6 KB) - added by Jakub Ś 6 years ago.
Sample with working solution
full_preset_preview.png (124.4 KB) - added by Wiktor Walc 5 years ago.
standard_preset_preview.png (108.3 KB) - added by Wiktor Walc 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by Jakub Ś

I have checked this in latest browsers and result seems to be opposite. In Webkit you have to scroll image while in other browsers image fits div perfectly.

I have used editor HTML and CSS classes in plain HTML page. Result was of course the same. I'm attaching sample file and will try to look for some solution to this later.

Changed 6 years ago by Jakub Ś

Attachment: img.html added

comment:2 Changed 6 years ago by Jakub Ś

Status: newconfirmed

I am attaching another sample with quick solution that worked across all browsers. All I did was replacing table with <div style="white-space: normal;">. Perhaps same solution could be used in dialog.

This needs further testing but I think it is enough to confirm this issue.

Changed 6 years ago by Jakub Ś

Attachment: _img.html added

Sample with working solution

comment:3 Changed 5 years ago by Wiktor Walc

Note that the results differ on standard and full presets. Having exactly the same content the size of the image is different in the preview window, depending on the preset. Confirmed in Firefox and Chrome.

Changed 5 years ago by Wiktor Walc

Attachment: full_preset_preview.png added

Changed 5 years ago by Wiktor Walc

Attachment: standard_preset_preview.png added

comment:4 Changed 5 years ago by Wiktor Walc

Full preset:

Standard preset:

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