5 Aug 2011 9:17 PM #1
Ext 3.4 Toolbar in Panel does not resize when container div is resized
Ext version tested:
- Ext 3.4.0
- only default ext-all.css
Browser versions tested against:
- Chrome 13
- Mac OS X 10.6
- A toolbar inside a panel that is rendered to a div does not automatically resize itself when the browser window is resized. This worked perfectly in 3.0.3 (I did not test intermediate versions to find out where it stopped working). Perhaps I am doing something wrong, but it was working fine in 3.0.3 so it seems like a bug. I can not use a viewport in my case, the Panel must be rendered to a div within other HTML on the page.
I tried adding "monitorResize" to the Toolbar config itself and that did not help.
Steps to reproduce the problem:
- Load page with a container div set to a percentage width
- Resize browser window
- Notice the panel and its contents resize, but the toolbar does not (gets clipped if window is sized smaller, or leaves a white gap if window is sized larger)
The result that was expected:
- Toolbar to be resized along with the panel contents and panel border
The result that occurs instead:
- Toolbar width stayed the same when window was resized
Screenshot or Video:
Debugging already done:
- Running this code against 3.0.3 works as expected.
- not provided
5 Oct 2011 10:52 AM #2
I'm having the same problem
...with a slightly different setup.
I have a panel with a toolbar, and I'm calling doLayout on a parent panel when the window is resized (essentially, I'm re-implementing monitorResize because I have some other things I'm working with).
When doLayout is called on a panel that has been resized, any toolbars inside the panel will not be resized.
I'm also running Ext 3.4.
EDIT: Toolbar resizing works just fine when the tbar's panel is contained within an Ext.Window/Ext.Viewport. It seems that it only breaks if the parent is an Ext.Panel that is being resized (either manually or via monitorResize).
As an aside, I wasn't able to find any resizable/resizing panels with toolbars in the official Examples that aren't inside a Ext.Window/Ext.Viewport.
Update: the bug appears to be somewhere within the panel.tbar.setWidth and panel.topToolbar.setSize functions. Once an integer is passed to these, it seems that passing another integer later has no effect. The Ext.Panel.onResize function calls these on each toolbar, but it seems that only the first call to these has any effect (so subsequent resizes fail to resize the panel).
11 Oct 2011 8:56 AM #3
Bump - can someone take a look at this?
I'd appreciate a reply, even if it is a [rejected] tag
12 Sep 2012 6:29 AM #4
We appear to be having a similar issue with Mac OS X 10.6 using both Safari and Chrome. Is there any official response from Sencha in regards to this bug? Is there a suggested work around?