#333 SelectNode fix for IE7

Version 2.x
closed
Editor (144)
5
2007-02-23
2007-02-01
Anonymous
No

Problem: IE7 reports error when trying to select node in nodePath plugin (I use my own rewriten of it's first version). Problem is in FCKSelection.SelectNode function.

Fix:
FCKSelection.SelectNode = function( node )
{
FCK.Focus() ;
FCK.EditorDocument.selection.empty() ;
var oRange ;
try
{
// Try to select the node as a control.
oRange = FCK.EditorDocument.body.createControlRange() ;
oRange.addElement( node ) ;
}
catch(e)
{
// If failed, select it as a text range.
// oRange = FCK.EditorDocument.selection.createRange() ;
oRange = FCK.EditorDocument.body.createTextRange();
oRange.moveToElementText( node ) ;
}

oRange.select() ;
}

It's said to give e-mail, you could contact me via yurik dot m at gmail dot com

Discussion

  • Alfonso Martinez

    • assigned_to: nobody --> alfonsoml
    • status: open --> closed
     
  • Alfonso Martinez

    Logged In: YES
    user_id=1356422
    Originator: NO

    This patch, or a similar implementation, has been included in
    FCKeditor and has been committed in the SVN. It will be available
    in the next release.

    For more information about the FCKeditor SVN system, please use
    the following URL:
    http://wiki.fckeditor.net/SVN

    ----
    http://www.fckeditor.net
    "Support Open Source Software"

    PS.: This is a canned response.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks