Ticket #798: 798.patch

File 798.patch, 2.9 KB (added by Alfonso Martínez de Lizarrondo, 13 years ago)

Proposed patch

  • _whatsnew.html

     
    5050                        character inside text wasn't encoded in Opera and Safari.</li>
    5151                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2467">#2467</a>] Fixed JavaScript
    5252                        error with the fit window command in source mode.</li>
     53                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/798">#798</a>,
     54                        <a target="_blank" href="http://dev.fckeditor.net/ticket/2495">#2495</a>] If an image was
     55                        placed inside a container with dimensions or floating it wasn't possible to edit its
     56                        properties from the toolbar or context menu.</li>
    5357        </ul>
    5458        <p>
    5559                <a href="_whatsnew_history.html">See previous versions history</a></p>
  • editor/_source/internals/fck_contextmenu.js

     
    341341
    342342function FCK_ContextMenu_OnItemClick( item )
    343343{
    344         FCK.Focus() ;
     344        // IE might work incorrectly if we refocus the editor #798
     345        if ( !FCKBrowserInfo.IsIE )
     346                FCK.Focus() ;
     347
    345348        FCKCommands.GetCommand( item.Name ).Execute( item.CustomData ) ;
    346349}
  • editor/_source/internals/fck_ie.js

     
    136136
    137137        this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ;
    138138
    139         this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save( true ) ; } ) ;
     139        this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save() ; } ) ;
    140140
    141141        // Catch cursor selection changes.
    142142        this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ;
  • editor/_source/internals/fckselection_ie.js

     
    210210        return FCK.EditorDocument.selection ;
    211211}
    212212
    213 FCKSelection.Save = function( noFocus )
     213FCKSelection.Save = function()
    214214{
    215         // Ensures the editor has the selection focus. (#1801)
    216         if ( !noFocus )
    217                 FCK.Focus() ;
    218 
    219215        var editorDocument = FCK.EditorDocument ;
    220216
    221217        if ( !editorDocument )
     
    226222
    227223        if ( selection )
    228224        {
    229                 range = selection.createRange() ;
     225                // The call might fail if the document doesn't have the focus (#1801),
     226                // but we don't want to modify the current selection (#2495) with a call to FCK.Focus() ;
     227                try {
     228                        range = selection.createRange() ;
     229                }
     230                catch(e) {}
    230231
    231232                // Ensure that the range comes from the editor document.
    232233                if ( range )
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy