This is a migrated thread and some comments may be shown as answers.

Hyperlinks with name attribute become Anchors when using properties

1 Answer 46 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Brian Garson
Top achievements
Rank 2
Brian Garson asked on 25 Jul 2011, 03:05 PM
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>

1 Answer, 1 is accepted

Sort by
0
Brian Garson
Top achievements
Rank 2
answered on 25 Jul 2011, 09:04 PM
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;
        }
Tags
Editor
Asked by
Brian Garson
Top achievements
Rank 2
Answers by
Brian Garson
Top achievements
Rank 2
Share this question
or