Opened 13 years ago

Last modified 10 years ago

#8091 confirmed Bug

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

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


Steps to reproduce:

  1. Go to
  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 (2)

comment:1 Changed 13 years ago by Jakub Ś

Keywords: IE added; ie editor.resize invalid argument haspatch removed
Status: newconfirmed
Version: 3.63.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 10 years ago by Jakub Ś

Keywords: IE8 added; IE removed

Related to #11613 and still reproducible in IE8.

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