Opened 14 years ago
Last modified 11 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@… |
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 (2)
comment:1 Changed 14 years ago by
Keywords: | IE added; ie editor.resize invalid argument haspatch removed |
---|---|
Status: | new → confirmed |
Version: | 3.6 → 3.0 |
comment:2 Changed 11 years ago by
Keywords: | IE8 added; IE removed |
---|
Related to #11613 and still reproducible in IE8.
Reproducible from CKEditor 3.0 in IE8, IE7, IE6.
IE9 as well as other browsers didn't throw any errors in this case.