[CLOSED] Problem with focus and tabpanels under IE9

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Problem with focus and tabpanels under IE9

    There is a bug under IE 9 with tabpanels and textfields. To reproduce, follow:

    - Run example below.
    - Place the focus on the textfield in the panel titled "A".
    - Type something, like "11111".
    - Select the panel titled "B".
    - Notice that, although the textfield in the panel "A" is not visible anymore, the focus seems to be still on it.
    - Type something, without placing the focus in the textfield in panel "BBBBBBB", like "222222".
    - Go back to the panel "A"
    - Notice that the text typed when you were in panel "B" was entered in the textfield in the panel "A" when it shouldn't. The text in textfield in panel "A" will be something like "11111222222" when it should contain only "11111".


    I detected it under IE 9, don't know if it happens in other versions. In firefox i couldn't reproduce the error.

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:TabPanel runat="server" ID="funciona">
            <Items>
                <ext:Panel runat="server" Title="A">
                    <Items>
                        <ext:TextField runat="server">
                        </ext:TextField>
                    </Items>
                </ext:Panel>
                <ext:Panel ID="Panel1" runat="server" Title="B">
                    <Items>
                        <ext:TextField ID="TextField1" runat="server">
                        </ext:TextField>
                    </Items>
                </ext:Panel>
            </Items>
        </ext:TabPanel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jun 27, 2011 at 12:31 PM. Reason: [CLOSED]
  2. #2
    Hi,

    We have reproduced and investigating.

    Thank you for the report.
  3. #3
    Hi,

    At this moment I can suggest the following workaround
    <TabChange Handler="Ext.getBody().focus();" />
  4. #4
    If there is a textarea into a frame this solution causes more problems... If you type something in these textareas and change tabs, when you go back to the original tab the text seems to be blank, until you hover the textarea with the mouse...

    See example below:

    aspx with the tabpanel:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title></title>
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:TabPanel runat="server" ID="funciona">
            <Listeners>
                <TabChange Handler="Ext.getBody().focus();" />
            </Listeners>
            <Items>
                <ext:Panel runat="server" Title="AAAAAA" MaxLength="500">
                    <AutoLoad Url="WebFormProblem1.aspx" ShowMask="true" Mode="iframe" />
                </ext:Panel>
                <ext:Panel ID="Panel1" runat="server" Title="BBBBB">
                    <AutoLoad Url="WebFormProblem1.aspx" ShowMask="true" Mode="iframe" />
                </ext:Panel>
            </Items>
        </ext:TabPanel>
        </form>
    </body>
    </html>
    aspx opened in the frames:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
                <ext:Panel ID="Panel1" runat="server" Title="BBBBB">
                    <Content>                
                        <ext:TextField ID="TextField1" runat="server">
                        </ext:TextField>
    
                        <ext:TextArea ID="TextArea1" runat="server" MaxLength="5">
                        </ext:TextArea>
                    </Content>
                </ext:Panel>
        </form>
    </body>
    </html>
  5. #5
    Hi,

    Yes, IE, It is true to himself, as always
    At this moment, i found the following workaround only
    - set HideMode="Offsets" for each tab
  6. #6
    In the example it seemed to work, but in our real world application everything got completely mad after making this change...
    I'll try to reproduce in an example to you;

    In the first solution, instead of using Ext.getBody().focus();, is there an easy way to retrieve the first control in the panel and set the focus in it? Wouldn't this fix the second problem?
  7. #7
    Hi,

    I have a fix which fixes the case without iframes
    TextArea inside a iframe is still a problem

    In the example it seemed to work, but in our real world application everything got completely mad after making this change...
    Does the real application use iframes inside tabs?
  8. #8
    Hi,

    Please update from SVN and retest.
    Now both cases should work correctly under IE9
  9. #9
    Please, tell what you have changed.
    I can't update from svn right now.
  10. #10
    Hi,

    onStripMouseDown method of TabPanel
    Just see SVN log to review changes
Page 1 of 2 12 LastLast

Similar Threads

  1. EditableGrid focus Problem?
    By zyyjc in forum 1.x Help
    Replies: 0
    Last Post: May 25, 2012, 1:00 PM
  2. [CLOSED] Problem opening multiple tabpanels the same time.
    By majunior in forum 1.x Legacy Premium Help
    Replies: 58
    Last Post: Jun 01, 2011, 8:39 PM
  3. [CLOSED] Focus Problem in EditableGrid Plugin
    By kemalyigit in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 18, 2011, 6:00 PM
  4. [CLOSED] Problem with GridPanel BottomBars on a TabPanels
    By asztern in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 22, 2010, 3:11 PM
  5. [CLOSED] focus problem
    By peterdiplaros in forum 1.x Legacy Premium Help
    Replies: 19
    Last Post: Feb 05, 2009, 6:20 PM

Posting Permissions