Note that there are some explanatory texts on larger screens.

plurals
  1. POAjaxToolkit: the last TabContainer on the page is focused on page load
    primarykey
    data
    text
    <p>I'm using more than one TabContainer on a page in an ASP.NET project and I noticed a really strange behavior: when the page is loaded the focus jumps to the last TabContainer on the page, causing it to scroll down. I don't explicitly focus on any control so I don't understand where this is coming from. I also switched places between the controls and it is always the last one that is focused. The TabContainers don't have any fancy settings, this is basically what they look like:</p> <pre><code>&lt;cc1:TabContainer ID="tabContainer" runat="server"&gt; &lt;cc1:TabPanel runat="server" HeaderText="Header1" ID="tabPanel1" TabIndex="0"&gt; &lt;HeaderTemplate&gt; &lt;asp:Label ID="lblTab1" runat="server" Text="Tab1"&gt;&lt;/asp:Label&gt; &lt;/HeaderTemplate&gt; &lt;ContentTemplate&gt; ... (anything goes here, it still doesn't work) &lt;/ContentTemplate&gt; &lt;/cc1:TabPanel&gt; &lt;cc1:TabPanel runat="server" HeaderText="Header2" ID="tabPanel2" TabIndex="1"&gt; &lt;HeaderTemplate&gt; &lt;asp:Label ID="lblTab2" EnableViewState="False" runat="server" Text="Tab2"&gt;&lt;/asp:Label&gt; &lt;/HeaderTemplate&gt; &lt;ContentTemplate&gt; ... (anything goes here, it still doesn't work) &lt;/ContentTemplate&gt; &lt;/cc1:TabPanel&gt; &lt;/cc1:TabContainer&gt; </code></pre> <p>I know I can set focus on a control, I tried it but the page first scrolls to the tab container and then returns to the focused control (it doesn't look good). I tried this to set the focus to another control:</p> <pre><code>&lt;body id="main" onload="javascript:document.getElementById('lnkLogout').focus();"&gt; </code></pre> <p>Is this the standard behavior for the TabContainer? How can I get rid of it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload