Monday, November 26, 2012

Issue with HeaderPanel content height in Safari and Chrome

I have a layout that uses HeaderPanel that is having trouble in Safari and Chrome on Windows 7.
 
I traced the problem to the footer content widget having a min-height value of 20px.  If I remove this value the calculations work as expected.  If you look in ResizeLayoutPanel.ImplStandard you can see that minHeight gets added in the init function for non IE browsers and the comment indicates that the style is added for proper scrollbar functionality.
 
Basically what is happeing is the browser is rendering the content widget smaller than it should because of this 20px minimum.  In IE the implementation does not have the 20 pixel minimum.
 
I can remove the 20px and the calculations work fine.  If I manually add the 20px min height in IE 9's dev tools, the layout seems to mimic the Safari/Chrome problem.  The other option, that I can think of, would be to grab the hieght of the headerpanel itself and subtract the header height and footer height.  This seems like a bad idea...
 
Does HeaderPanel even need to use ResizeLayoutPanel because Footers don't normally scroll themselves?
 
Is there a better way to trick these browsers into scrolling properly so that my layout doesn't get messed up?
 
Any thoughts on what I should do?
 
Thanks,
Pat

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/hw852twqQAUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment