Ticket #4863 (closed Bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: pekka Owned by: m.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

CKScreenshot.PNG (34.0 KB) - added by pekka 4 years ago.
Screenshot of iframe in FF3.5
4863.patch (1.4 KB) - added by m.nguyen 4 years ago.
4863_2.patch (1.1 KB) - added by m.nguyen 4 years ago.
4863_3.patch (2.6 KB) - added by m.nguyen 4 years ago.

Change History

Changed 4 years ago by pekka

Screenshot of iframe in FF3.5

comment:1 Changed 4 years ago by pekka

Oh and the doctype used is HTML 4.01 Transitional.

comment:2 Changed 4 years ago by fredck

  • Keywords iframedialog firefox height removed
  • Milestone set to CKEditor 3.3

comment:3 Changed 4 years ago by garry.yao

  • Keywords Confirmed Firefox added
  • Version set to SVN (CKEditor)

Confirmed with FF only.

comment:4 Changed 4 years ago by m.nguyen

This bug happens on almost browser and skin.

comment:5 Changed 4 years ago by m.nguyen

  • Keywords Review added; Confirmed Firefox removed

comment:6 Changed 4 years ago by m.nguyen

  • Keywords Confirmed Firefox Review? added; Review removed

comment:7 Changed 4 years ago by m.nguyen

  • Status changed from new to assigned
  • Owner set to m.nguyen

comment:8 Changed 4 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:9 Changed 4 years ago by garry.yao

  • Milestone changed from CKEditor 3.3 to CKEditor 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 4 years ago by m.nguyen

comment:10 Changed 4 years ago by m.nguyen

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:11 Changed 4 years ago by m.nguyen

Fixed with [4922].

comment:12 Changed 4 years ago by fredck

  • Status changed from closed to reopened
  • Keywords Review- added; Review+ removed
  • Resolution fixed deleted
  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

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

comment:13 Changed 4 years ago by fredck

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

Changed 4 years ago by m.nguyen

comment:14 Changed 4 years ago by m.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 4 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 4 years ago by m.nguyen

comment:16 Changed 4 years ago by m.nguyen

  • Keywords Review? added; Review- removed

comment:17 Changed 4 years ago by garry.yao

  • Keywords Review+ added; Review? removed

comment:18 Changed 4 years ago by m.nguyen

#5347 has been marked as dup

comment:19 Changed 4 years ago by m.nguyen

  • Status changed from reopened to closed
  • Resolution set to fixed

Refixed with [5248].

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