Tabs messing up scroll position RRS feed

  • Question

  • User1509476649 posted

    Tried posting this yesterday; but it never got added to the thread.

    I update the AJAX controls in my system from 4.3 to 7, in order to fix the AJAX controls not being displayed on tab panels.  Now the tabs are taking over the scrolling position, alway forcing the scroll to the top of the tabs, whether the user is modifying something on the main form or within a tab panel (note: I talking the scroll bars for browser window not scroll bars on the tabs).  This is extermely annoying to my users.

    Looking at the latest AJAX Souce code from December, I noticed that the _app_onload function forces the focus to the active tab.  I believe this is occuring upon every postback.  Before I muck around with the source, I wanted to see if there was a reason for this.

    Note: I did find others complaining about this functionality on other threads, like getting started; but the only answer I saw was that it was by design; whcih doesn't help fix my users issues.

    ...Since posting this I commente out the "activeTab._setFocus(activeTab);" line.  It works in multiple browsers; just not IE8, which is what my organization is current stuck on.  Still looking for a solution to the Scroll Position.

    Wednesday, March 5, 2014 8:28 AM


  • User-933407369 posted

    hi frank,

    According to your description, without seeing any codes, i don't provide a specific solution.

    your codes seems like below:

    ajax:ToolkitScriptManager ID="scriptmanager1" runat="server"></ajax:ToolkitScriptManager>
        <script type="text/javascript">
            Sys.Extended.UI.TabContainer.prototype._app_onload = function (sender, e) {
                if (this._cachedActiveTabIndex != -1) {
                    this._cachedActiveTabIndex = -1;
                    var activeTab = this.get_tabs()[this._activeTabIndex];
                    if (activeTab) {
                        activeTab._wasLoaded = true;
                        //activeTab._setFocus(activeTab);     // the only change made to this prototype
                this._loaded = true;

    please refer to the links for details:

    Ajax Control Toolkit tab panel control gets the focus automatically and the page scrolls to that control on load


    TabContainer throws exception in user control with Nov release


    if it is not helpful for you, I suggest that you can consult your issue on ASP.NET Ajax forum: http://ajaxcontroltoolkit.codeplex.com/workitem/list/basic  for better solution and support. Experts there will further research this issue and provide you better support.

    Thank you for your understanding.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 5, 2014 9:35 PM