Opened 11 years ago
Closed 10 years ago
#12733 closed Bug (fixed)
Radio button onChange doesn't work in IE9+
| Reported by: | i.kostadinov | Owned by: | Szymon Kupś |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.5.4 |
| Component: | UI : Dialogs | Version: | 4.0 |
| Keywords: | Cc: |
Description
I have defined a custom onChange function for a radio button group that I use in one of my custom dialogs. It works in Firefox, Chrome and IE8 (haven't tested earlier versions), but not in IE9, IE10 or IE11.
I think this is because of the IE changes described here - http://msdn.microsoft.com/en-us/library/ie/ms536956%28v=vs.85%29.aspx
I think the browser check should be the same as for the checkbox, namely
if ( !CKEDITOR.env.ie || ( CKEDITOR.env.version > 8 ) )
instead of
if ( !CKEDITOR.env.ie )
Change History (3)
comment:1 Changed 11 years ago by
| Status: | new → confirmed |
|---|---|
| Version: | 4.4.6 → 4.0 |
comment:2 Changed 10 years ago by
| Owner: | set to Szymon Kupś |
|---|---|
| Status: | confirmed → review |
Reviewing PR:
https://github.com/ckeditor/ckeditor-dev/pull/214
comment:3 Changed 10 years ago by
| Milestone: | → CKEditor 4.5.4 |
|---|---|
| Resolution: | → fixed |
| Status: | review → closed |
I've added some minor code style fixes and merged changes into master with git:47e6f7f.

Code you mention is located in ckeditor/plugins/dialogui/plugin.js in checkbox and radio prototypes.
Now, I have added your changes to this plugin code and below code to replacebycode.html sample
CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name, dialogDefinition = ev.data.definition, editor = ev.editor; if ( dialogName == 'image' ) { // Get a reference to the "Image Upload" tab. var infoTab = dialogDefinition.getContents( 'info' ); infoTab.add( { type: 'radio', id: 'customId', label: 'Test Label', title: 'Test Title', className: 'radioClass', required: false, items: [ ['Test0', 'Test0', 'Test0'], ['Test1', 'Test1', 'Test1'], ['Test2', 'Test2', 'Test2'] ], onChange: function( event ){ console.log('changed'); } }); } });It has worked thus I think you are 100% right.