Opened 12 years ago
Last modified 11 years ago
#9478 closed Bug
Undefined table width gets reset to default — at Version 7
Reported by: | Joel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | 4.0 |
Keywords: | Cc: |
Description (last modified by )
To reproduce:
- Clear editor contents with CRTL+A Backspace
- Insert default table
- Open table properties dialog, clear width value and click OK
- Open table properties one more time.
Result: Default table width 500px is present in width field and once you click OK table gets default width.
Reproducible in CKEditor 4 in all browsers. Works fine in CKEditor 3.6.5
Change History (5)
comment:2 Changed 11 years ago by
comment:4 Changed 11 years ago by
Component: | General → UI : Dialogs |
---|---|
Description: | modified (diff) |
Status: | new → confirmed |
Summary: | Undefined table width gets reset to default if changing other settings. → Undefined table width gets reset to default |
Version: | 3.6.4 → 4.0 (GitHub - master) |
comment:5 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 11 years ago by
This bug depends quite a bit on the configuration. I was able to reproduce in 3.6.2 in jsfiddle, see http://jsfiddle.net/gz9b4/1/
If you remove the following conditional and everything in it, the bug does not appear. If you keep it, the bug appears.
if ( dialogName == 'tableProperties' ){...}
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|
@req - without your code modifying the table plugin bug can only be reprodyuced in v4. With this code bug can be reproduced in v4 but also in v3 from CKE 3.6.1 rev. [6979]. I have reported it here #9560 as this is different issue.
CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; // Set default table width during creation. if(dialogName == 'table') { var infoTab = dialogDefinition.getContents( 'info' ); txtWidth = infoTab.get( 'txtWidth' ); txtWidth['default'] = '100%'; } if ( dialogName == 'tableProperties' ) { var infoTab = dialogDefinition.getContents( 'info' ); var tab = dialogDefinition.getContents( 'advanced' ); tab.remove ('advLangDir'); tab.remove ('advStyles'); tab.remove ('advCSSClasses'); } }); window.x = CKEDITOR.editor.replace('editor1', { removePlugins : 'button,div,filebrowser,flash,format,forms,horizontalrule,indent,justify,liststyle,pagebreak,showborders,stylescombo,templates', toolbar : [ ['Source', 'Table'] ], });
Apparently this requires a specific configuration to work. I could not reproduce in demo, but I was able to reproduce (IE9 & Chrome) in the V4 demo at http://nightly-v4.ckeditor.com/3694/samples/fullpage.html
Another way on the same page