Index: _whatsnew.html =================================================================== --- _whatsnew.html (revision 1467) +++ _whatsnew.html (working copy) @@ -75,6 +75,8 @@ are now properly sized in Opera.
See previous versions history Index: editor/dialog/fck_button.html =================================================================== --- editor/dialog/fck_button.html (revision 1464) +++ editor/dialog/fck_button.html (working copy) @@ -47,8 +47,6 @@ GetE('txtName').value = oActiveEl.name ; GetE('txtValue').value = oActiveEl.value ; GetE('txtType').value = oActiveEl.type ; - - GetE('txtType').disabled = true ; } else oActiveEl = null ; @@ -68,7 +66,22 @@ oActiveEl.type = GetE('txtType').value ; oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ; } + else if ( oActiveEl && oActiveEl.type != GetE( 'txtType' ).value ) + { + var oNewEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ; + oNewEl.type = GetE( 'txtType' ).value ; + oActiveEl = oEditor.FCK.InsertElement( oNewEl ) ; + // FCKDialog.SelectionData is broken by now since we've deleted the previously selected element. + // So we need to reassign it. + if ( oEditor.FCKBrowserInfo.IsIE && oEditor.FCKDialog.SelectionData ) + { + var range = oEditor.FCK.EditorDocument.body.createControlRange() ; + range.add( oActiveEl ) ; + oEditor.FCKDialog.SelectionData = range ; + } + } + oActiveEl.name = GetE('txtName').value ; SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;