Show
Ignore:
Timestamp:
2008-02-11 19:14:35 (8 months ago)
Author:
alfonsoml
Message:

Fix #676 and #738, form elements in IE are quite special when you create them.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/dialog/fck_textfield.html

    r1398 r1504  
    5050                GetE('txtMax').value    = GetAttribute( oActiveEl, 'maxLength' ) ; 
    5151                GetE('txtType').value   = oActiveEl.type ; 
    52  
    53                 GetE('txtType').disabled = true ; 
    5452        } 
    5553        else 
     
    7674        } 
    7775 
    78         if ( !oActiveEl ) 
    79         { 
    80                 oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ; 
    81                 oActiveEl.type = GetE('txtType').value ; 
    82                 oEditor.FCKUndo.SaveUndoStep() ; 
    83                 oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ; 
    84         } 
     76        oEditor.FCKUndo.SaveUndoStep() ; 
    8577 
    86         oActiveEl.name = GetE('txtName').value ; 
     78        oActiveEl = CreateNamedElement( oEditor, oActiveEl, 'INPUT', {name: GetE('txtName').value, type: GetE('txtType').value } ) ; 
     79 
    8780        SetAttribute( oActiveEl, 'value'        , GetE('txtValue').value ) ; 
    8881        SetAttribute( oActiveEl, 'size'         , GetE('txtSize').value ) ;