Changeset 430

Show
Ignore:
Timestamp:
2007-07-10 10:53:54 (18 months ago)
Author:
martinkou
Message:

Fixed #327 : Hitting backspace while an image is being selection would incorrectly activate the browser's back function.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckenterkey.js

    r425 r430  
    141141 
    142142        if ( !oRange.CheckIsCollapsed() ) 
     143        { 
     144                // Bug #327, Backspace with an img selection would activate the default action in IE. 
     145                // Let's override that with our logic here. 
     146                if ( FCKBrowserInfo.IsIE && this.Window.document.selection.type.toLowerCase() == "control" ) 
     147                { 
     148                        var controls = this.Window.document.selection.createRange() ; 
     149                        for ( var i = controls.length - 1 ; i >= 0 ; i-- ) 
     150                        { 
     151                                var el = controls.item( i ) ; 
     152                                el.parentNode.removeChild( el ) ; 
     153                        } 
     154                        return true ; 
     155                } 
     156 
    143157                return false ; 
     158        } 
    144159 
    145160        var oStartBlock = oRange.StartBlock ;