Ticket #8091 (confirmed Bug)

Opened 3 years ago

Last modified 8 months ago

IE CKEDITOR.editor.resize throw 'invalid argument' when no height value is specified

Reported by: mrfr0g Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IE8 Cc: mcamden@…

Description

Steps to reproduce:

  1. Go to ckeditor.com/demo
  2. Open a javascript console and execute, 'CKEDITOR.instances.editor1.resize(50);'

The height value that is assigned becomes 'NaNpx' which is an invalid argument. Likely this has to due with line 345 in theme.js.

345 - contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' );

In this case since height is undefined, Math.max(undefined - delta,0) returns NaN. NaN + 'px' = 'NaNpx'. Other browsers must handle this error more gracefully than IE. A simple conditional statement should fix this problem.

344 - if(height) {
345 - contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' );
346 - }

Change History

comment:1 Changed 3 years ago by j.swiderski

  • Status changed from new to confirmed
  • Keywords IE added; ie editor.resize invalid argument haspatch removed
  • Version changed from 3.6 to 3.0

Reproducible from CKEditor 3.0 in IE8, IE7, IE6.

IE9 as well as other browsers didn't throw any errors in this case.

comment:2 Changed 8 months ago by j.swiderski

  • Keywords IE8 added; IE removed

Related to #11613 and still reproducible in IE8.

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