Hi,
I am trying to implement collapse / expand functionality for a canvas. The most simple way to collapse it is by changing style:‘display:none’ for the wrapper div of canvas.
The problem is that after collapsing a div, smartGWT buttons stop responding to click events in Firefox.
Is it a known bug?
Here is my code:
in GWT class:
private void addCanvas() {
filterSection = new Canvas();
filterSection.setWidth(150);
filterSection.setContents("12345<br/>12345");
Button expand = new Button("expand");
expand.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
DOM.getElementById("slot1").getStyle().setProperty("display", "block");
}
});
Button collapse = new Button("collapse");
collapse.addClickHandler(new ClickHandler(){
public void onClick(ClickEvent event) {
DOM.getElementById("slot1").getStyle().setProperty("display", "none");
}
});
RootPanel.get("buttons").add(expand);
RootPanel.get("buttons").add(collapse);
RootPanel.get("slot1").add(filterSection);
}
in HTML:
<div id="slot1"></div>
<div id="buttons"></div>
thank you