Results 1 to 5 of 5

Thread: Extjs 4, Extjs 5 - Wrong panel rendring in Internet Explorer

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2014
    Location
    India
    Posts
    10

    Default Extjs 4, Extjs 5 - Wrong panel rendring in Internet Explorer

    Hello there,

    While working on Extjs 5, we came across this bug using IE11. The rendering of a panel is not proper in the second row while using a table layout. I was able to reproduce this using Extjs 4 as well.

    The problem is when you have a table with divs with column layout as 1-2-1 or 1-2 columns (1, 2 represent number of columns in each row), the left column panel pushes towards right and the rendering is not proper. This does not happen when you use Chrome or Mozilla.

    Below are the fiddles. You need to use IE(11) to open this to see the distorted column. while in Chrome, it works well.

    https://fiddle.sencha.com/#fiddle/mnm (1-2-1 column layout)
    https://fiddle.sencha.com/#fiddle/mno (1-2 column layout).

    EDIT: I noticed that as soon as I remove the panel rendering on the first row from code, the 2nd row renders properly. Which is something we have been observing in our production environment too.

    Can someone help me on fixing this with a workaround or some way?

    Code below:

    Code:
    <html>
    <head>
    </head>
    <body>
        <h1>
            Testing Extjs Panel Rendering in 1-2-1 Layout
        </h1>
        <h5>
            This fiddle tests the Extjs panel rendering in a table with first row has one column(span2),
    the second row has two columns (width 50% each) and the third row again single column(colspan 2).
            This breaks the second row when tested in IE11 but works fine in Chrome/Firefox. This is 
    persistant in Extjs 4.x as well as 5.x
        </h5>
    
    
        <table border='1' width="800">
            <tbody>
                <tr>
                    <td colspan="2">
                        <div id="parent_div1">
                           <div id="information1"></div>                  
                        </div>
                     </td>
                </tr>
                <tr>
                    <td width="50%">
                        <div id="parent_div2">
                            <div id="information2"></div>
                        </div>
                    </td>
                    <td width="50%">
                        <div id="parent_div3">
                            <div id="information3"></div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div id="parent_div4">
                           <div id="information4"></div>                    
                        </div>
                     </td>
                </tr>
            </tbody>
        </table>
        <script>
            /*global Ext:false */
            Ext.onReady(function() {
            
            var resultsPanel1 = Ext.create('Ext.panel.Panel', {
                    title: 'Results1',
                    height: 200,
                    renderTo: "information1",
                    resizable: true,
                    border: true,
                    layout: {
                        type: 'vbox', // Arrange child items vertically
                        align: 'stretch', // Each takes up full width
                        padding: 5
                    },
                    items: []
                });
            
            
                var resultsPanel2 = Ext.create('Ext.panel.Panel', {
                    title: 'Results2',
                    height: 200,
                    renderTo: "information2",
                    resizable: true,
                    border: true,
                    layout: {
                        type: 'vbox', // Arrange child items vertically
                         align: 'stretch', // Each takes up full width// 
                        padding: 5
                    },
                    items: []
                });
            
                var resultsPanel3 = Ext.create('Ext.panel.Panel', {
                    title: 'Results3',
                    height: 200,
                    renderTo: "information3",
                    resizable: true,
                    border: true,
                    layout: {
                        type: 'vbox', // Arrange child items vertically
                        align: 'stretch', // Each takes up full width
                        padding: 5
                    },
                    items: []
                });
            var resultsPanel4 = Ext.create('Ext.panel.Panel', {
                    title: 'Results4',
                    height: 200,
                    renderTo: "information4",
                    resizable: true,
                    border: true,
                    layout: {
                        type: 'vbox', // Arrange child items vertically
                        align: 'stretch', // Each takes up full width
                        padding: 5
                    },
                    items: []
                });
            });
        </script>
        </body>    
    </html>
    Attached Images Attached Images

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    I think you'll have better and more consistent results if you use a "table" layout for managing this, rather than trying to render individual components into an existing table. I've included an example in the Fiddle below.

    http://docs.sencha.com/extjs/5.1/5.1...ontainer.Table

    Hope that helps!

    Thanks
    Joel


  3. #3
    Sencha Premium Member
    Join Date
    Dec 2014
    Location
    India
    Posts
    10

    Default

    Thanks for the reply.

    But we are using this in Liferay. Liferay provides various 'layout types' to users to be selected from the Control Panel. We provide different portlets that can be deployed in these layouts.

    So there is no question of using a 'Table Layout' as it is all managed at the html level by Liferay's Layout manager. Link here. As soon as the user uses the above mentioned layouts and adds the portlets we provide (which use ExtJS), they start facing these alignment issues. So I made it simple and tried the fiddle out which gave me these weird alignments that we are facing in production too.

    I don't think it should be that hard for anyone to use html with extjs and why shouldn't the panels inside a table display properly when used within html table? All we need is, ExtJS should respect the html it is embedded to.

  4. #4
    Sencha Premium Member
    Join Date
    Dec 2014
    Location
    India
    Posts
    10

    Default

    Can someone atleast confirm if this is a bug and if there is a workaround for this? As explained above we cannot use Table layout as the layout management part is leveraged from Liferay's.

  5. #5
    Sencha Premium Member
    Join Date
    Dec 2014
    Location
    India
    Posts
    10

    Default Need help!

    Hello,

    Can someone help me with this issue? This has now become P2 issue for our release and we need to fix it.

Similar Threads

  1. [CLOSED] Internet Explorer 8 and Extjs 4.2.0
    By florian-network in forum Ext:Bugs
    Replies: 4
    Last Post: 22 Oct 2013, 7:36 AM
  2. ExtJS and Internet Explorer 6 !
    By leksodav in forum Ext: Q&A
    Replies: 28
    Last Post: 21 Apr 2013, 9:12 AM
  3. Replies: 5
    Last Post: 9 Aug 2012, 6:50 AM
  4. Internet Explorer 9 ExtJS 3
    By janssen in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 1 Apr 2011, 12:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •