Opened 15 years ago
Last modified 13 years ago
#5552 review_failed Bug
Dialog doesn't execute 'commit' and 'setup' method of element when element miss 'id' property.
Reported by: | Minh Nguyen | Owned by: | Minh 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 (1)
Change History (4)
Changed 15 years ago by
Attachment: | 5552.patch added |
---|
comment:1 Changed 15 years ago by
Keywords: | Review? added |
---|---|
Owner: | set to Minh Nguyen |
Status: | new → assigned |
comment:3 Changed 13 years ago by
Status: | review → review_failed |
---|
The 'commit' and 'setup' and setup function have nothing to do with the id.
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.