Opened 10 years ago
Closed 10 years ago
#12398 closed Bug (fixed)
Maximize-Button doesn't work in instances without a title
Reported by: | Tobias Hößl | Owned by: | Artur Delura |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.5 |
Component: | General | Version: | 4.4.4 |
Keywords: | Cc: |
Description (last modified by )
When CKEditor is initialized like this...
CKEDITOR.replace(element, { title: '' });
...the Maximize-Button does produces an javascript-error and fails:
Uncaught TypeError: Cannot read property 'setCustomData' of null ckeditor.js:830 Uncaught TypeError: Cannot read property 'setSize' of null ckeditor.js:321
This can be seen here: https://www.hoessl.eu/ckeditor/samples/divreplace.html This is from the standard package, with only one modification: the ", {title: }" was added.
The reason seams to be that no .cke_voice_label-element is created for the instance when the title is empty, but the maximize-plugin thinks the .cke_inner-element is always the second child of its parent, probably in line 128 of plugins/maximize/plugin.js:
var container = editor.container.getChild( 1 );
First bad commit: e7b3238
Change History (9)
comment:1 Changed 10 years ago by
Keywords: | Maximize removed |
---|---|
Milestone: | → CKEditor 4.4.5 |
Status: | new → confirmed |
comment:2 Changed 10 years ago by
Owner: | set to Artur Delura |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 10 years ago by
I wonder whether we can assume that container which we are looking for is always this one which has class cke_inner
. If yes, we could use more sophisticated selector that getting element by index.
comment:5 follow-up: 6 Changed 10 years ago by
I think we can be sure of that.
What worries me is that I found container.getChild( 1 ) also in themedui.js, so very likely you need to check also that place.
comment:6 Changed 10 years ago by
Replying to Reinmar:
I think we can be sure of that.
What worries me is that I found container.getChild( 1 ) also in themedui.js, so very likely you need to check also that place.
I didn't have to check, it just failed when fixed first selector :D
comment:8 Changed 10 years ago by
The branch was not rebase on latest master. Remember to do that before putting it on review, so you're sure that it's compatible with latest changes at the moment.
comment:9 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | review → closed |
Fixed on master with git:9555c193 but I also thought that for safety reasons we should check elements only: git:baa5394.
Thanks. Confirmed and scheduled for the next minor release.