View Full Version : Grids in BorderLayout/ContentPanel and scrolling issues
glassy
30 Nov 2006, 10:24 AM
I'm beginning to convert my layouts with grids in them to use BorderLayout, but I've run into some scrolling issues with DOCTYPE Strict.
Take a look:
DOCTYPE Strict:
http://www.viquasoft.com/yui-ext/examples/grid/array-grid-cols-layout.html
No DOCTYPE:
http://www.viquasoft.com/yui-ext/examples/grid/array-grid-cols-layout-nonstrict.html
In FireFox the behaviour for both is the same and as expected.
In Opera 9 with No DOCTYPE it works as expected. With DOCTYPE Strict you can page down or mouse scroll beyond the scrollbar.
In IE (7) with No DOCTYPE it works as expected. With DOCTYPE Strict the grid scrolls on top of the top (north) region. Also with no DOCTYPE it seems to be more responsive.
Should I just use no DOCTYPE to fix the problems?
(Sorry if this is a newbie question/problem.)
tryanDLS
30 Nov 2006, 10:50 AM
Maybe it's 'scroll=no' on your body element. That may be an IE-only attribute that's acting different in IE7. AFAIK it's not in the HTML spec
glassy
30 Nov 2006, 11:06 AM
Thanks for the response, but before I added scroll='no' it was even worse.
Check it out:
http://www.viquasoft.com/yui-ext/examples/grid/array-grid-cols-layout-noscrollno.html
Double scrollbars! (in IE7 at least)
I can't understand why Microsoft couldn't get it right with IE7. They just ignore overflow: hidden on the body tag in Strict mode while the quirks mode recognizes it!!?
Anyways scroll="no" removes it - I actually took this advice from this thread:
http://www.yui-ext.com/forum/viewtopic.php?t=343&highlight=doctype
jack.slocum
30 Nov 2006, 2:12 PM
IE7 strict mode is screwed. It has all kinds of bugs. The most prominent is overflow:auto elements + position relative.
http://rowanw.com/bugs/overflow_relative.htm
Try setting "postition:relative" on the grid container, this will sometimes fix the IE7 strict bug. scroll="no" is required to kill the scrollbar in ie7 strict mode as you noted.
Opera 9 allows you to scroll beyond the end of the page in strict mode if the page has overflow:auto elements. Again, no clue why. :)
My general experience is that instead of forcing the browser to conform, strict mode instead opens up all kind of bugs in every browser. That is why I rarely use a strict doctype. It also has worse performance, especially in IE.
jbowman
30 Nov 2006, 2:55 PM
what doctype would you suggest assigning for yui-ext projects? I've been using strict with no problems so far, but I'm getting deeper and deeper into things now.
tryanDLS
30 Nov 2006, 3:25 PM
I've been using strict with no problem in both IE and FF. It's based on the complex layout - 5 regions, with nested regions inside some of them, multiple grids and tabpanels added on the fly. Seems to be fine. I'd rather use strict, and then back off to trans if there's an issue.
jack.slocum
30 Nov 2006, 3:32 PM
To be honest, my preference is no doctype. Let the browser decide which mode is it's fav. yui-ext will adapt. :)
I doubt many will agree with me though. hehe
glassy
1 Dec 2006, 10:04 AM
Thanks for the responses :)
Yes, I'm starting to agree with Jack on the doctypes ... the main reason being that IE behaves worse in strict mode. With these kinds of bugs it's actually harder to get consistent behaviour in strict mode than with no doctype ... at least on these scrolling issues.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.