MVC helpers generate anchor tags with local href for each tab

2 posts, 0 answers
  1. Trent
    Trent avatar
    4 posts
    Member since:
    Dec 2011

    Posted 31 Mar 2014 Link to this post

    Currently the MVC helpers will generate an anchor tag with a local href for each tab in the tab strip (e.g. #actions-1, #actions-2), and will generate the subsequent id for each content pane. If the tab strip is the first element on the page, this works ok, but if there is content above the tab strip, then when changing tabs the page will scroll until the tabstrip is at the top of the page, and then scroll back down once the new tab has been loaded. This is a bit jarring and only seems to happen when using Internet Explorer. When using plain html and javascript, local hrefs are not generated. Is there a reason they are generated for the MVC helpers, and are they necessary?
  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 02 Apr 2014 Link to this post

    Hello Trent,

    Basically the anchor is generated by the MVC wrapper which uses the Html helper to generate links and I am afraid it is not possible to change the rendering behavior.

    On which browser does this exactly happen? I tried the offline MVC demos and on Internet Explorer 10 it does not seems to make the browser jump up and down when click on the tabs. Also you can try to prevent the default behavior of any link inside the tabstrip.


    //when the tabstrip is initialized
    $("#tabstrip").on("click", ".k-link", function(e){

    If possible give a sample project and concrete instructions so we can search for a resolution.

    Kind Regards,
    Petur Subev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top