View Full Version : Bugs in borderlayout, etc? Panels don't resize

1 Nov 2006, 4:56 PM
Hi - I've been collecting a list of possible bugs that I've encountered while implementing a small app. I posted this in the comments to an article but now that I see people are reporting bugs in beta versions here, I'll do the same.

* Given a layout and a sublayout added as a center panel of the layout: if you remove the sublayout and then add it in, the sublayout's region dimensions are wrong. Specifically I found that the north region was now 0 height. I was doing this because I wanted to hide and show elements without a visible tab bar - my workaround solution was to CSS hide the tab bar, but this is a bit hacky because there's no easy way to identify a specific panel's tab bar. The generated DOM doesn't have predictable IDs, at least that I could see? It would be nice if instead of sequentially numbering them the IDs were based on the ID of the DIV that owns the layout...
- also note (not a bug) that the add/remove region code is not very forgiving about removing something that wasn't added. In other words, if you're conditionally adding a panel but at some point unconditionally want to ensure it's been removed, you're stuck with tracking it (there might be some way to do "panel exists in this region?" but I didn't see it)

* I cannot get a subpanel to reliably respond to changes in the size of north content. For instance if I change the north region to make it smaller, the center panel keeps its layout, leaving whitespace where the north panel used to be. But if I make the north panel bigger, the center panel does shrink. That's why I think I'm doing the right thing but encountering a bug.
- Note that it may very well have something to do with the measurement of absolutely positioned panels... I'm still not able to measure the true height of content within the north region - the code you provided (whether clipping or not) always returns the fixed height of the panel.
- Note #2 that I pretty much suck at javascript so that could easily be my fault.

* When autoscrolling I am seeing a case where the scrollable region gets an unnecessary horizontal scrollbar. The extra scroll space is the width of the right-side vertical scrollbar. I can see from your blog itself that this doesn't always happen, but I'm not doing anything drastically different in my code, so it may be a corner case that I'm excercising...

* Given two tabs (panels) in the same region, and flipping back and forth between them: if I hide() and then show() an element in one panel, and then flip to the other, the element from the now-hidden panel remains absolutely positioned on the screen while the other panel is displaying.

I can help you debug these if you tell me where to look; I can also show you my working project - it's pretty simple code but is work for a client so I can't post the URL here, I'd have to mail it to you.

(Part of the reason I suck at javascript is because I can't find any good tools for debugging. Can I ask what you use to debug your scripts? I have FireBug but it's not very good at giving stack traces, etc. :( )

Thanks again for your work on this excellent package. Despite any bugs I'm encountering it's still saved me MANY hours of time.

1 Nov 2006, 9:30 PM
Steve, see the thread in the development discussion forum. I created it before seeing this one.