Ticket #1782: 1782_2.patch

File 1782_2.patch, 1.7 kB (added by fredck, 8 months ago)
  • _whatsnew.html

     
    7171                        is now enforced only when ForcePasteAsPlainText = true.</li> 
    7272                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1336">#1336</a>] Sometimes 
    7373                        the autogrow plugin didn't work properly in Firefox.</li> 
     74                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1782">#1782</a>] Clicking on radio 
     75                        buttons or checkboxes in the editor in IE will no longer cause lockups in IE.</li> 
    7476        </ul> 
    7577        <p> 
    7678                <a href="_whatsnew_history.html">See previous versions history</a> 
  • editor/_source/internals/fck_ie.js

     
    138138         
    139139        // Catch cursor selection changes. 
    140140        this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ; 
     141 
     142        FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', Doc_OnMouseDown ) ; 
    141143} 
    142144 
    143145FCK.InsertHtml = function( html ) 
     
    430432 
    431433        return aCreatedLinks ; 
    432434} 
     435 
     436function _FCK_RemoveDisabledAtt() 
     437{ 
     438        this.removeAttribute( 'disabled' ) ; 
     439} 
     440 
     441function Doc_OnMouseDown( evt ) 
     442{ 
     443        var e = evt.srcElement ; 
     444 
     445        // Radio buttons and checkboxes should not be allowed to be triggered in IE 
     446        // in editable mode. Otherwise the whole browser window may be locked by 
     447        // the buttons. (#1782) 
     448        if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled ) 
     449        { 
     450                e.disabled = true ; 
     451                FCKTools.SetTimeout( _FCK_RemoveDisabledAtt, 1, e ) ; 
     452        } 
     453}