PDA

View Full Version : [CLOSED] [GXT 2.0-M2] TextArea||HtmlEditor if panel collapse then non-editable



mimikoko
6 Jun 2009, 10:14 AM
GWT: 1.6.4
GXT: 2.0-m2
FireFox: 3.0.10

Hallo,

The problem is that if you have an HtmlEditor in a collapsible panel, collapsing and expanding the panel leaves you with a non-editable HtmlEditor. but does not appear in IE (it does appear in Firefox and Opera).

sven
6 Jun 2009, 10:17 AM
Yes and that cant be solved. FF isnt supporting display none for some dom node types. An iframe is one of them.

I am closing this issue.

mimikoko
6 Jun 2009, 10:27 AM
Thanks for the quick reply, sven.


but, how can I solve it then?

my frame is per default false

centerPanel.setFrame(false);

I need another layout or what? :)

Thanks

sven
6 Jun 2009, 10:30 AM
No, The HtmlEditor is interly using an Iframe and that fails after hiding it.

mimikoko
6 Jun 2009, 10:39 AM
I'm sorry, you say
Yes and that cant be solved

but HtmlEditor has not setFrage Method.


could you give me some tip, please.

sven
6 Jun 2009, 10:41 AM
You cant solve it. I suggest to disable collapsing.

fother
6 Jun 2009, 10:46 AM
if you set display none for the div that contain the elements? isnt possible?

mimikoko
6 Jun 2009, 10:47 AM
The problem occurs not only when collapsing.
-when browser minimizing
- each panel resize


I suggest to disable collapsing
that can not be a solution, but thank

mimikoko
6 Jun 2009, 11:13 AM
Hallo fother,
yes I have, but the problem is still there :-?

it does not, it's all gone


protected void onRender(Element target, int index) {
setElement(DOM.createDiv(), target, index);

textarea = new El(DOM.createTextArea());
textarea.setElementAttribute("id", id);
textarea.setElementAttribute("class", settings.getEditorSelector());

textarea.setStyleAttribute("border", "0 none");
textarea.setStyleAttribute("display", "none");

el().appendChild(textarea.dom);
super.onRender(target, index);
}


by TabPanel helps nor.

I do not have more any ideas

mimikoko
7 Jun 2009, 12:59 AM
I have found it.

I do not know whether the bug, or my fault?



public class ApplicationView extends View{
...

private void createCenter() {
private void createCenter() {
centerPanel = new ContentPanel();
centerPanel.setBorders(false);
centerPanel.setHeaderVisible(false);
centerPanel.setLayout(new FitLayout());
centerPanel.setAnimCollapse(false);

//
// with VerticalPanel comes the error (by collapsing/browser minimizing/panel resize)
//
// VerticalPanel verticalPanel = new VerticalPanel();
// verticalPanel.setLayout(new FitLayout());
// verticalPanel.setBorders(false);

TabPanel tabPanel = new TabPanel();
tabPanel.setBorderStyle(false);
tabPanel.setBodyBorder(false);
tabPanel.setBorders(false);
tabPanel.setResizeTabs(true);
tabPanel.setTabScroll(true);
tabPanel.setCloseContextMenu(true);

TabItem wellcome = new TabItem("wellcome");
wellcome.setBorders(false);
wellcome.addText("wellcome");
tabPanel.add(wellcome);

TabItem editorItem = new TabItem();
editorItem.setText("EDITOR");
editorItem.setLayout(new FitLayout());
editorItem.setClosable(true);

TinyMCESettings settings = new TinyMCESettings();
TinyMCE tinyMCE = new TinyMCE(settings);
editorItem.add(tinyMCE);
tabPanel.add(editorItem);

// verticalPanel.add(tabPanel);
// centerPanel.add(verticalPanel);

centerPanel.add(tabPanel);

BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER);
data.setMargins(new Margins(5, 5, 5, 0));
viewport.add(centerPanel, data);
}
...


public void onModuleLoad() {
...
dispatcher.dispatch(AppEvents.Init);

Viewport v = Registry.get(ApplicationView.VIEWPORT);
v.layout(true);
}