Ticket #1782: 1782.patch

File 1782.patch, 2.4 KB (added by Martin Kou, 13 years 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.js

     
    917917        FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', _FCK_MouseEventsListener ) ;
    918918        FCKTools.AddEventListener( FCK.EditorDocument, 'mouseup', _FCK_MouseEventsListener ) ;
    919919
     920        // Fix for #1782 : Radio buttons and checkboxes should not be allowed to be triggered in IE in editable mode.
     921        // Otherwise the whole browser window may be locked by the buttons.
     922        if ( FCKBrowserInfo.IsIE )
     923                FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', _FCK_FixCheckboxRadioButtonSelection ) ;
     924
    920925        // Most of the CTRL key combos do not work under Safari for onkeydown and onkeypress (See #1119)
    921926        // But we can use the keyup event to override some of these...
    922927        if ( FCKBrowserInfo.IsSafari )
  • editor/_source/internals/fck_ie.js

     
    430430
    431431        return aCreatedLinks ;
    432432}
     433
     434_FCK_FixCheckboxRadioButtonSelection_Next = function()
     435{
     436        this.removeAttribute( 'disabled' ) ;
     437        if ( this._fck_wasDisabled )
     438                this.disabled = true ;
     439        this.removeAttribute( '_fck_wasDisabled' ) ;
     440}
     441
     442_FCK_FixCheckboxRadioButtonSelection = function( evt )
     443{
     444        var e = evt.srcElement ;
     445        if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) )
     446        {
     447                e._fck_wasDisabled = e.disabled ;
     448                e.disabled = true ;
     449                FCKTools.SetTimeout( _FCK_FixCheckboxRadioButtonSelection_Next, 50, e ) ;
     450        }
     451}
© 2003 – 2020 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy