Hyperlinks with name attribute become Anchors when using properties

2 posts, 0 answers
  1. Brian Garson
    Brian Garson avatar
    54 posts
    Member since:
    Jan 2008

    Posted 25 Jul 2011 Link to this post

    Hello,

    I noticed this in the latest build of Telerik, and was not present in the previous version that we were using (2010 first quarter).  We're now using: 2011.1.519.35 

    I've tested this across all 3 major browsers for PC (IE8, FF 5.0, Chrome latest)

    if you use the following HTML and paste it into HTML view in the Editor, switch to Design view and select a link, and ctrl-k or use the toolbar/menu to get to the link properties.. It forces you to the 2nd tab "anchor" and if you go to the first tab "hyperlink" the URL is not populated.. 


    <a href="http://twitter.com" name="twitter" >twitter</a> <br />
    <a href="http://facebook.com" name="facebook">facebook</a> <br />
    <a href="http://linkedin.com" name="linkedin">linkedin</a> <br />
    <a href="http://youtube.com" name="youtube" >youtube</a>

  2. Brian Garson
    Brian Garson avatar
    54 posts
    Member since:
    Jan 2008

    Posted 25 Jul 2011 Link to this post

    I guess this is as designed, although it shouldn't lose the HREF if you tab back over, you should have both data.

    I forgot that I had overwritten some of the LinkManager.ascx Javascript, if anyone is looking for the solution, you can change

    this line found around line 130 (have some other custom stuff in the file so not 100% sure of line number)

    if (currentLink.name && currentLink.name.trim() != "" )
            {
                this._anchorName.value = currentLink.name;
                this._tab.set_selectedIndex(1);
                return;
            }


    to:

    if (currentLink.name && currentLink.name.trim() != "" && !currentHref) //added in the !currentHref
            {
                this._anchorName.value = currentLink.name;
                this._tab.set_selectedIndex(1);
                return;
            }
Back to Top