Ticket #7893: 7893_2.patch

File 7893_2.patch, 1023 bytes (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/link/dialogs/link.js

     
    254254                        anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
    255255                }
    256256
     257                // For some browsers we set contenteditable="false" on anchors, making document.anchors not to include them, so we must traverse the links manually (#7893).
     258                if ( CKEDITOR.plugins.link.emptyAnchorFix )
     259                {
     260                        var links = editor.document.getElementsByTag( 'a' ), link;
     261                        for ( i = 0, count = links.count(); i < count; i++ )
     262                        {
     263                                link = links.getItem( i );
     264                                if ( !link.getChildCount() && link.hasAttribute( 'name' ) )
     265                                        anchors.push( { name : link.getAttribute( 'name' ), id : link.getAttribute( 'id' ) } );
     266                        }
     267                }
     268
    257269                if ( CKEDITOR.plugins.link.fakeAnchor )
    258270                {
    259271                        var imgs = editor.document.getElementsByTag( 'img' ), anchor;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy