Changeset 2375

Show
Ignore:
Timestamp:
2008-08-25 22:13:02 (5 months ago)
Author:
alfonsoml
Message:

Make it possible to work with images inside floating divs. #798 and #2495

Location:
FCKeditor/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_contextmenu.js

    r2287 r2375  
    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} 
  • FCKeditor/trunk/editor/_source/internals/fck_ie.js

    r2256 r2375  
    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. 
  • FCKeditor/trunk/editor/_source/internals/fckselection_ie.js

    r2363 r2375  
    211211} 
    212212 
    213 FCKSelection.Save = function( noFocus ) 
    214 { 
    215         // Ensures the editor has the selection focus. (#1801) 
    216         if ( !noFocus ) 
    217                 FCK.Focus() ; 
    218  
     213FCKSelection.Save = function() 
     214{ 
    219215        var editorDocument = FCK.EditorDocument ; 
    220216 
     
    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. 
     
    255256FCKSelection.Restore = function() 
    256257{ 
    257         if ( this.SelectionData ) 
     258        if ( this.SelectionData && this.SelectionData.createRange )  
    258259        { 
    259260                FCK.IsSelectionChangeLocked = true ; 
  • FCKeditor/trunk/_whatsnew.html

    r2374 r2375  
    5555                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1891">#1891</a>] Removed 
    5656                        unnecessary name attributes in dialogs. </li> 
     57                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/798">#798</a>,  
     58                        <a target="_blank" href="http://dev.fckeditor.net/ticket/2495">#2495</a>] If an image was 
     59                        placed inside a container with dimensions or floating it wasn't possible to edit its  
     60                        properties from the toolbar or context menu.</li> 
    5761        </ul> 
    5862        <p>