-
9 Nov 2009 2:17 AM #1
IE7 scroll problem
IE7 scroll problem
Hello everyone,
I have a small problem regarding the display of scroll bars on IE7.
The code for the test page is:
After the window is displayed, I run from the Firebug Console(mozilla), or from the Script tab in Developer Tools(IE8), the following command:Code:Ext.onReady(function(){ var win = new Ext.Window({ width: 300, height : 300, layout : 'fit', items : [{ xtype : 'form', layout : 'anchor', items : [{ xtype : 'tabpanel', anchor : '100% 100%', bodyStyle : 'overflow:auto;', enableTabScroll : true, items : [{ title : 'Tab 1', id : 'tab1' }], activeTab : 0 }] }] }); win.show(); });
In IE8 and Mozilla, the tab will be resized to 500px in height, and the horizontal/vertical scroll bars will appear.Code:Ext.getCmp('tab1').setHeight(500);
In IE7, the tab will be resized, but no scroll bars will appear. I don't know how much of an Ext problem this is, but considering you guys have extensive experience with browsers, I was hoping for a good hint for IE7.
Thanks a lot,
Vlad
-
9 Nov 2009 5:13 AM #2
additional info
additional info
I've noticed that after modifying the height to 500, the scroll does appear, but instead of being on the inside of the component with
specified, it's on the outside of the overflowing component.Code:overflow : auto;
For this, I've modified the width of the child of the component withfrom 284px to 265px. By doing this, the scroll will appear. However, it doesn't seem to function properly.Code:overflow : auto;
Any thoughts are welcomed.
Thanks a lot,
Vlad
-
9 Nov 2009 7:09 AM #3
intermediate fix
intermediate fix
Hi,
so after trying a ton of different stuff, I managed to find a patch. Apparently, if I override the position:relative for the body of the panel, the scroll will display correctly on IE7. However, this is not a solution for my complex layout (seems that some issues with floating objects appear), but I would appreciate any insight to why the position:relative is causing so much trouble on IE7.
Code:<style type="text/css"> .position-static{ position : static !important; height : 500px !important; } </style> <script> Ext.onReady(function(){ var win = new Ext.Window({ width: 300, height : 300, layout : 'fit', items : [{ xtype : 'form', layout : 'anchor', items : [{ xtype : 'tabpanel', anchor : '100% 100%', bodyStyle : 'overflow:auto;', enableTabScroll : true, items : [{ title : 'Tab 1', id : 'tab1', html : 'Lorem ipsum...very long text', bodyCssClass : 'position-static' }], activeTab : 0 }] }] }); win.show(); }); </script>
-
9 Nov 2009 7:23 AM #4
You've spent all this time overlooking a major point of the ExtJs layout system.
You do not manage the size of child Components of size managing layouts. The parent Container's layout (In this case, CardLayout) does.
You must not touch the size of "tab1". You must not make it position: static.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
9 Nov 2009 7:32 AM #5
Why not?
Why not?
Well, I agree with not making the position static. It doesn't help me a lot anyway, but I needed some way to eliminate the position : relative bit, and overriding it with the default value was the first thing that came to my mind.
About the height of tab1, I must say again this is a simplified example. In my code, I overrid the setSize of BoxComponent to take into account a minimum size. And this works very well in IE8 and Firefox, so I can't imagine why it shouldn't be the same in IE7.
Sticking to the example, I think I'll probably lose some more time trying to figure this one out.
In case I come up with something, I'll let you know.
Thanks a lot for your feedback,
Vlad
-
9 Nov 2009 7:58 AM #6
@vladcd --
Start with some basics before you get too involved with custom styling:
Code:items : [{ xtype : 'tabpanel', anchor : '100% 100%', bodyStyle : 'overflow:auto;', enableTabScroll : true, defaults: { autoScroll :true }, items : [{ title : 'Tab 1', id : 'tab1', html : 'Lorem ipsum...very long text' }], activeTab : 0 }]"be dom-ready..."
Doug Hendricks
Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.
Got Sencha licensing questions? Find out more here.
-
9 Nov 2009 9:10 AM #7
Solution
Solution
Thanks for all your feedback.
I found the solution in the end.
Since the previous code seemed to lead nowhere, I just added an extra panel which is meant to do just that: provide the scroll bars and scroll the content correctly.Code:Ext.onReady(function(){ var win = new Ext.Window({ width: 300, height : 300, layout : 'fit', items : [{ xtype : 'form', layout : 'anchor', items : [{ xtype : 'tabpanel', anchor : '100% 100%', enableTabScroll : true, items : [{ title : 'Tab 1', id : 'tab1', autoScroll : true, items : [{ xtype : 'panel', html : 'Text', height : 500 }] }], activeTab : 0 }] }] }); win.show(); });


Reply With Quote

