Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FF5 in debug mode: Some events are not received

    Some simple ClickHandlers do not work any more with Firefox 5 in debug mode. Still, compiled mode works as expected.

    Any idea of how to workaround this within FF5? This really slows down development.

    SmartGWT: Tested with 2.4 and with the latest 2.5
    GWT: 2.2.0
    Browser: Firefox 5.0
    GWT browser plugin: 1.0.10401 (22/07/11)

    Example below: There are two ImgButtons, one plain (the left one) and one wrapped in a CanvasItem within a form (the right one). When running in debug mode, only the plain one receives the onClick message, in compiled mode both receive the message as expected.

    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.types.SelectionType;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.ImgButton;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.CanvasItem;
    import com.smartgwt.client.widgets.layout.HLayout;
    
    public class Test implements EntryPoint {
    
        public void onModuleLoad() {
            HLayout hLayout = new HLayout();
            
            DynamicForm form = new DynamicForm();  
            form.setID("testForm");  
            
            CanvasItem canvasItem = new CanvasItem();
            ImgButton imgButton = createButton("Form button clicked", "Form button");        
            canvasItem.setCanvas(imgButton);
            canvasItem.setShowTitle(false);
            
            form.setFields(canvasItem); 
            form.setLeft(100);
            
            hLayout.addChild(form);
            hLayout.addChild(createButton("Plain img button clicked", "Plain button"));
            
            hLayout.draw();
        }
        
        private ImgButton createButton(final String clickText, String tooltip) {
            final ImgButton imgButton = new ImgButton();
            
            imgButton.setTooltip(tooltip);
            imgButton.setShowTitle(false);
            imgButton.setShowRollOver(true);
            imgButton.setShowDown(true);
            imgButton.setSrc("[SKIN]/ImgButton/button.png");
            imgButton.setSize(18);
            imgButton.setActionType(SelectionType.BUTTON);
            imgButton.addClickHandler(new ClickHandler() {            
                @Override
                public void onClick(ClickEvent event) {
                    SC.say(clickText);
                }
            });   
            return imgButton;
        }
    
    }

    #2
    Works again!

    After testing for some hours with different browsers/plugins/operating systems it is solved. I have completely removed and then readded the gwt developer plugin to the browser, then it worked again. Seems like after updating FF from 4.0.1 to 5 the developer plugin had some problems.

    Comment

    Working...
    X