Ticket #4612: 4612_2.patch

File 4612_2.patch, 1.1 KB (added by Minh Nguyen, 14 years ago)
  • _source/plugins/link/dialogs/link.js

     
    13241324                        else
    13251325                        {
    13261326                                // We're only editing an existing link, so just overwrite the attributes.
    1327                                 var element = this._.selectedElement;
     1327                                var element = this._.selectedElement,
     1328                                        href = element.getAttribute( '_cke_saved_href' ),
     1329                                        textView = element.getHtml();
    13281330
    13291331                                // IE BUG: Setting the name attribute to an existing link doesn't work.
    13301332                                // Must re-create the link from weired syntax to workaround.
     
    13451347
    13461348                                element.setAttributes( attributes );
    13471349                                element.removeAttributes( removeAttributes );
    1348 
     1350                                // Update text view when user changes protocol #4612.
     1351                                if (href == textView)
     1352                                        element.setHtml( attributes._cke_saved_href );
    13491353                                // Make the element display as an anchor if a name has been set.
    13501354                                if ( element.getAttribute( 'name' ) )
    13511355                                        element.addClass( 'cke_anchor' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy