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

[Solved] Focus

5 Answers 123 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steve
Top achievements
Rank 1
Steve asked on 24 Dec 2009, 01:26 AM
I have a tabstrip about 1/3rd of the way down the page.  I scroll down a bit, change the tab - it puts me back to the top of the page, not keeping my position.

Could this be addressed ?

Thanks

5 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 Dec 2009, 04:41 PM
Hello Steve,

Can you reproduce this problem in our online demos? The problem you are describing should not occur if the tabstrip is working as expected. Do you see any JavaScript errors in your page? Have you added a ScriptRegistrar?

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steve
Top achievements
Rank 1
answered on 26 Dec 2009, 04:24 PM
It's hit or miss actually.

Even on the demo - sometimes it doesn't change position, other tabs it does

ie. if you select a Site.Master that fills the tab - and select one that doesn't, it switches oddly  (ie. Site.Master to Description)

Now, if you select a tab that fills the tab, then select another (ie. Site.Master then View) then it works.
0
Atanas Korchev
Telerik team
answered on 28 Dec 2009, 12:05 PM
Hello Steve,

The described behavior occurs because the pages have different height. The browser scrolls up because upon tab switching sometimes there is no need for a scrollbar. I recommend you fix the height of your pages like this:

Html.Telerik().TabStrip()
            .Name("TabStrip")
            .Items(items =>
                {
                    items.Add().Text("First").ContentHtmlAttributes(new {style="height:200px;overflow:auto"});
                    items.Add().Text("Second").ContentHtmlAttributes(new {style="height:200px;overflow:auto"});

Then all tabs will be 200px tall and scrollable if their content exceeds the 200px height.

I hope this helps,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Steve
Top achievements
Rank 1
answered on 28 Dec 2009, 12:22 PM
I'll give it a try- thanks!
0
Timur
Top achievements
Rank 1
answered on 23 Mar 2012, 02:37 PM
Hi,

I am having the same issue with MVC Tabstrip 2011.3.1115. 

Some more details:
1. Issue only occurs in Google Chrome (17.0.963.79). Firefox and IE do not scroll up.

2. Issue only occurs on the first click after initial page load: I have 4 tabs at the bottom of my page. After the page is loaded if I scroll down to the tab strip and click on the 2nd tab, the page will scroll up. If I scroll down and click on the 2nd tab again, the page does NOT scroll up. However, if I click on the 3rd tab, it will scroll up again. Once all the tabs have been clicked once, the scrolling up stops. It almost seems like it does not know where anchor '#AccountDetailsTabStrip-4' is, or the onclick handler does not return false for the link until it has been clicked once??

3. The solution proposed here does actually work. It's also not that great, since in my case, the tabstrips have grids embedded in them which vary in number of items and I would like the size to be adjusted dynamically without having any scrollbars..

Please let me know if there are any other fixes or workarounds for this.

Thanks for a great control library!

Timur

Tags
TabStrip
Asked by
Steve
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Steve
Top achievements
Rank 1
Timur
Top achievements
Rank 1
Share this question
or