Ticket #8091 (confirmed Bug)
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: | IE | Cc: | mcamden@… |
Description
Steps to reproduce:
- Go to ckeditor.com/demo
- 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
Note: See
TracTickets for help on using
tickets.

Reproducible from CKEditor 3.0 in IE8, IE7, IE6.
IE9 as well as other browsers didn't throw any errors in this case.