Opened 14 years ago

Closed 14 years ago

#4863 closed Bug (fixed)

Kama skin: IFrame created in iframedialog plugin doesn't stretch to 100% height in FF3.5

Reported by: Pekka Gaiser Owned by: Minh Nguyen
Priority: Normal Milestone: CKEditor 3.3
Component: UI : Dialogs Version: SVN (CKEditor) - OLD
Keywords: Confirmed Firefox Review+ Cc:

Description

When creating a new plugin that utilizes the iframedialog plugin, you have to pass a Pixel width and height:

CKEDITOR.plugins.add('dialog_name',{
    requires: ['iframedialog'],
    init:function(a){
        CKEDITOR.dialog.addIframe('dialog_name', 
                                  'Smiley',
                                  this.path+'lister.php',550,300,
                                  function(){/*oniframeload*/})
       // etc. etc.

iframedialog will assign those values to the dialog only and not to the iframe. The iframe gets assigned 100% width and height in the final source code.

In the kama skin, but not in the office2003 and v2 skins, this will lead to the iframe being only 160 Pixels tall in Firefox 3.5. It works as expected in Internet Explorer 8.

A fix that worked for me in Firefox 3.5 was to modify plugins/iframedialog/plugin.js and set a fixed width to the iframe:

CKEDITOR.dialog.addIframe = function( name, title, src, width, height, onContentLoad )
        {
            var element =
            {
                type : 'iframe',
                src : src,
                width : '100%',
                height : height  // CHANGED 
            };

The attached screen shot is using a customized template but checked with the original kama template as well.

Feel free to contact me on follow-up questions.

Thanks for providing this awesome product.

Attachments (4)

CKScreenshot.PNG (34.0 KB) - added by Pekka Gaiser 14 years ago.
Screenshot of iframe in FF3.5
4863.patch (1.4 KB) - added by Minh Nguyen 14 years ago.
4863_2.patch (1.1 KB) - added by Minh Nguyen 14 years ago.
4863_3.patch (2.6 KB) - added by Minh Nguyen 14 years ago.

Download all attachments as: .zip

Change History (23)

Changed 14 years ago by Pekka Gaiser

Attachment: CKScreenshot.PNG added

Screenshot of iframe in FF3.5

comment:1 Changed 14 years ago by Pekka Gaiser

Oh and the doctype used is HTML 4.01 Transitional.

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: iframedialog firefox height removed
Milestone: CKEditor 3.3

comment:3 Changed 14 years ago by Garry Yao

Keywords: Confirmed Firefox added
Version: SVN (CKEditor)

Confirmed with FF only.

comment:4 Changed 14 years ago by Minh Nguyen

This bug happens on almost browser and skin.

comment:5 Changed 14 years ago by Minh Nguyen

Keywords: Review added; Confirmed Firefox removed

comment:6 Changed 14 years ago by Minh Nguyen

Keywords: Confirmed Firefox Review? added; Review removed

comment:7 Changed 14 years ago by Minh Nguyen

Owner: set to Minh Nguyen
Status: newassigned

comment:8 Changed 14 years ago by Garry Yao

Keywords: Review+ added; Review? removed

comment:9 Changed 14 years ago by Garry Yao

Milestone: CKEditor 3.3CKEditor 3.2

Move to 3.2 since this bug not only affect iframe dialog plugin, but all dialogs' height in Firefox:

Environment

Firefox, Win7

Reproducing Procedures

  1. Open any page sample, then open the 'Link' dialog;
  2. Inspect the layout height of dialog contents element (td.cke_dialog_contents) with Firebug;
  • Actual Result: The layouted height is 208;
  • Expected Result: The layout height should be identical to defined minimum height, which is 230.

Changed 14 years ago by Minh Nguyen

Attachment: 4863.patch added

comment:10 Changed 14 years ago by Minh Nguyen

Resolution: fixed
Status: assignedclosed

comment:11 Changed 14 years ago by Minh Nguyen

Fixed with [4922].

comment:12 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review+ removed
Milestone: CKEditor 3.2CKEditor 3.3
Resolution: fixed
Status: closedreopened

I've reverted [4922] with [5199] because was breaking dialogs in IE Quirks.

comment:13 Changed 14 years ago by Frederico Caldeira Knabben

To be less drastic, I've reimplemented [4922] with [5201], but avoiding it on IE quirks for now.

Changed 14 years ago by Minh Nguyen

Attachment: 4863_2.patch added

comment:14 Changed 14 years ago by Minh Nguyen

Keywords: Review? added; Review- removed

New patch for IE quirks mode. This solution was a bit problem with smiley plugin, but this patch also fixed it.

comment:15 Changed 14 years ago by Garry Yao

Keywords: Review- added; Review? removed

Cong, that's a nice hack[[BR]] We should try to keep layout hacks inside CSS files and comment out the culprit.

Changed 14 years ago by Minh Nguyen

Attachment: 4863_3.patch added

comment:16 Changed 14 years ago by Minh Nguyen

Keywords: Review? added; Review- removed

comment:17 Changed 14 years ago by Garry Yao

Keywords: Review+ added; Review? removed

comment:18 Changed 14 years ago by Minh Nguyen

#5347 has been marked as dup

comment:19 Changed 14 years ago by Minh Nguyen

Resolution: fixed
Status: reopenedclosed

Refixed with [5248].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy