The update method of any container doesn't work in IE

  1. #1

    The update method of any container doesn't work in IE

    Dear Support team,


    I ran into issue, the update method of any container throws a java-script error in any version of IE. The same code works well in any other browser.
    Also, I found that the issue exists only in the version 2 of Ext.Net. The same code works well in version 1 and 3.
    My version of Ext.net is "2.5.2" (Pro License)
    Here is the sample code:


    <%@ Page Language="C#"%>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>The issue</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
        </form>
        <ext:Panel runat="server" ID="Panel1" Width="320" Height="50" Title="The Issue" Layout="hbox">
            <Items>
                <ext:TextField runat="server" ID="TextField1" FieldLabel="Any field"></ext:TextField>
                <ext:Button runat="server" ID="Button1" Text="Test" Icon="Error" Flex="1">
                    <Listeners>
                        <Click Handler="App.Panel1.update()"></Click>
                    </Listeners>
                </ext:Button>
            </Items>
        </ext:Panel>
    </body>
    </html>

    This issue can be reproduced even on the examples page.
    You can see comparison of the different versions behavior on this video:



    I found the comment in the code, near the block that throws exception: "core/layout/Field.js" This may help to find the problem faster.


    I can be wrong, but here is my assumption about the cause of this issue:
    It seems like this issue exists for all type of containers which contain any descendants of type Field (text field, combo box, date field etc).
    Error appears in the code where Ext.Net overrides the layout behavior of Field type. When container is updated it recreates its contents. When one line of code is reached in Chrome the markup is already recreated, but in IE the DOM contents of the panel is empty.
    The JS engine can't find a parent of the indicator element because at this moment there is no any markup inside of the panel (neither indicator cell, nor main component cell).

    Hope you can help,
    Sander
    Last edited by prost; Jul 03, 2015 at 8:54 AM.
  2. #2
    Hello,

    I am quite surprised why this code doesn't break in Chrome as well.

    In your sample the .update() method call a Container's Ext.Element's .update() which deal with raw HTML.
    http://docs.sencha.com/extjs/4.2.1/#...-method-update

    It is something you should not do in your test case and it is expected to me why it breaks in IE and, again, not expected why it doesn't in Chrome.

    I think you should probably replace
    App.Panel1.update()
    with
    App.Panel1.updateLayout()
    in your test case.

    Does it work for you with the real world page that you are dealing with?
  3. #3
    This solved the problem, thanks Daniil!

Similar Threads

  1. Replies: 11
    Last Post: Jan 30, 2014, 11:49 AM
  2. [FIXED] [1.0] Container update problem
    By d.urazalinov in forum 1.x Help
    Replies: 1
    Last Post: Jul 29, 2010, 8:03 AM
  3. Replies: 4
    Last Post: Feb 09, 2010, 1:21 AM
  4. [CLOSED] TextArea in Container doesn't line up to fields above
    By sdevanney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 30, 2010, 5:45 PM
  5. Object doesn't support this property or method
    By Tbaseflug in forum 1.x Help
    Replies: 8
    Last Post: Aug 18, 2009, 12:10 PM

Posting Permissions