Looks like we can't reproduce the issue or there's a problem in the test case provided.
Empty panel header title is always rendered
REQUIRED INFORMATIONExt version tested:
Browser versions tested against:
DOCTYPE tested against:
- Safari 6.0.1
- Chrome 22.0.1229.94
Steps to reproduce the problem:
- I want to add some centered text after the title in a panel header.
- Panel headers that use an items config always render the items before the title. Thus I need to put the title in the items config and omit the header's title config.
- Ext is always rendering an empty header text element which throws off the layout.
- This entire scenario makes it next to impossible to customize a panel header without copying private framework code.
The result that was expected:
- Create a panel. Omit the title config.
- Give it a header config. Omit the title config here as well.
- In the header config, add a container to the items collection that represents the manually managed title.
- Add another container to the items collection. Add css to center the text. Give it a flex of 1.
The result that occurs instead:
- The container with the centered text is rendered in the center of the header.
- The container with the centered text is rendered offset from the center due to the presence of an empty header text element.
//title: 'panel 1',
html: 'panel 1',
html: '<p style="text-align:center">centered text</p>',
See this URL for live test case:
Debugging already done:
- If the title config is not specified, the Header class sets it to a non-breaking space.
- This non-breaking space is then rendered with a flex of 1, after the items collection.
- Specifying various css classes on the manually managed title in the items collection seems to have no effect. The header class always wants to include the non-breaking space and then render it.
Additional CSS used:
- OS X 10.8.2
- Windows 7 Pro SP1
Last edited by mpost; 3 Nov 2012 at 10:08 AM.
Reason: fix code formatting