Changeset 252

Show
Ignore:
Timestamp:
2007-04-16 22:06:59 (3 years ago)
Author:
alfonsoml
Message:

Fix for #338, after creating a link we avoid leaving a br inside so it isn't so easy to select it in the next line.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

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

    r237 r252  
    394394                                oLink.href = url ; 
    395395                                oLink.innerHTML = sInnerHtml ;          // Restore the innerHTML. 
     396 
     397                                // If the last child is a <br> move it outside the link or it will be too easy to select this link again #338 
     398                                if (oLink.lastChild.nodeName == 'BR' ) 
     399                                { 
     400                                        // We move the br as a sibling after the link: 
     401                                        var oBR = oLink.lastChild ; 
     402                                        oLink.removeChild( oBR ) ; 
     403                                        // There's no insertAfter, so we insert before the next sibling 
     404                                        oLink.parentNode.insertBefore( oBR, oLink.nextSibling  ); 
     405                                } 
     406 
    396407                                return oLink ; 
    397408                        } 
  • FCKeditor/trunk/_whatsnew.html

    r247 r252  
    5252                        was being lost for images or comments only HTML inserted directly in the editor 
    5353                        source or loaded in the editor.</li> 
     54                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/338">#338</a>] Creating links in 
     55                        lines separated by &lt;br&gt; in IE can lead to a merge of the links.</li> 
    5456        </ul> 
    5557        <h3>