Firefox: display='none' problem in smartGWT

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

Best to use a SectionStack or any other SmartGWT widget for this interaction. When you change the DOM around SmartGWT components in most cases there is no way for the components to know this. That’s what’s causing the click handling problem.

Just to check, I added the usual HTML buttons that do the same thing: change style display for “slot1” DIV. This works perfectly, the problem starts only when SmartGWT button does it.

That’s not very plausible, but regardless, same advice applies.