Ticket #5552 (review_failed Bug)
Dialog doesn't execute 'commit' and 'setup' method of element when element miss 'id' property.
| Reported by: | m.nguyen | Owned by: | m.nguyen |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | SVN (CKEditor) - OLD |
| Keywords: | Cc: |
Description
Steps to reproduce
Create new dialog without set id attribute for element or open one old dialog and remove id attribute of element:
CKEDITOR.dialog.add( 'bulletedListStyle', function( editor )
{
return {
title : editor.lang.list.numberedTitle,
minWidth : 300,
minHeight : 50,
contents :
[
{
elements :
[
{
type : 'hbox',
widths : [ '25%', '75%' ],
children :
[
{
label: editor.lang.list.start,
type: 'text',
setup : function( element )
{
var value = element.getAttribute( 'start' ) || 1;
value && this.setValue( value );
},
commit : function( element )
{
element.setAttribute( 'start', this.getValue() );
}
},
{
type : 'select',
label : editor.lang.list.type,
width: '100%',
items :
[
[ editor.lang.list.style_1 , '1' ],
[ editor.lang.list.style_a , 'a' ],
[ editor.lang.list.style_A , 'A' ],
[ editor.lang.list.style_i , 'i' ],
[ editor.lang.list.style_I , 'I' ]
],
setup : function( element )
{
var value = element.getAttribute( 'type' ) || '1';
this.setValue( value );
},
commit : function( element )
{
element.setAttribute( 'type', this.getValue() );
}
}
]
}
]
}
],
onShow: function()
{
var editor = this.getParentEditor(),
element = getListElement( editor, 'ol' );
element && this.setupContent( element );
},
onOk: function()
{
var editor = this.getParentEditor(),
element = getListElement( editor, 'ol' );
element && this.commitContent( element );
}
}
});
- Expected: all 'commit' and 'setup' method of element will execute
- Result: only the last element have that behavior
Attachments
Change History
comment:1 Changed 3 years ago by m.nguyen
- Keywords Review? added
- Status changed from new to assigned
- Owner set to m.nguyen
When user doesn't add 'id' attributes, the id of 'element' will be 'undefined'. This patch automatically add dynamic 'id' when user didn't add.
Note: See
TracTickets for help on using
tickets.
