Opened 7 years ago

Closed 4 years ago

#9450 closed Bug (fixed)

autoGrow_onStartup not working

Reported by: Jeff Fournier Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.3
Keywords: Cc:

Description

When the autogrow plugin is added to CKEditor, the editor will always grow no matter what the value of autoGrow_onStartup is.

To replicate simply add the autogrow plugin and set autoGrow_onStartup to false. The editor will grow even if autrogrow is false.

I think the problem is in _source/plugins/autogrow/plugin.js at line 71 :

editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 );

This line doesn't seem to do anything. If you put it as an "if" condition and add the next lines into the "if" it resolves the problem :

if(editor.config.autoGrow_onStartup && ( eventsList[ 'instanceReady' ] = 1 ))
{
   for ( var eventName in eventsList )
   {
	...				
   }
}

I used :

CKEditor 3.6.4 Windows 7 Firefox

Change History (2)

comment:1 Changed 7 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.43.6.3

Reproducible in all browsers from CKEditor 3.6.3 rev. [7391].

But this revision looks IMHO ok and the problem is the line mentioned by @jffou17. It really looks like there is missing if statement which this should be wrapped in.

comment:2 Changed 4 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

In CKEditor 4 the line mentioned has been replaced with editor.config.autoGrow_onStartup && editor.execCommand( 'autogrow' );

Now everything seems to work fine.

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