Announcement

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

    IE8, addWindowClosingHandler and Calendar.addEventClickHandler.

    In IE8, a ClosingEvent appears to be generated when clicking an event in the the month view Calendar.

    Code:
            com.google.gwt.user.client.Window.addWindowClosingHandler(new ClosingHandler() {
    
                @Override
                public void onWindowClosing(ClosingEvent closingEvent) {
                ...
                }
            });
    Code:
            addEventClickHandler(new EventClickHandler() {
                @Override
                public void onEventClick(CalendarEventClick event) {
                    event.cancel();
                    ...
                }
            });
    When I click an event in the month view Calendar, both onEventClick and onWindowClosing are invoked.

    In Firefox, Chrome and IE11, only the onEventClick is invoked when clicking an event in the the month view Calendar.

    SmartClient Version: v9.1p_2015-02-03/Pro Deployment (built 2015-02-03)

    Thanks

    #2
    Unfortunately IE is broken, and fires the onbeforeunload event (the native event underlying this GWT event) in a lot of different circumstances.

    There is no way for us to modify the IE to avoid the native event firing, or to modify this GWT API to fix this or other cases.

    While you could have your logic in your onWindowClosing handler skip taking action in known circumstances where you are bogusly called, the best thing is to avoid using this event at all, as it's not guaranteed to be fired.

    Comment


      #3
      Thank you for the update.

      Comment

      Working...
      X