Reviewers: rjrjr,

Description:
Detailed description:
A recent change introduced the PreviewNativeEvent, which replaces
DOM.setEventPreview.  The change is breaking because PopupPanels now use
the PreviewNativeEvent, which puts them on the new preview stack (where
all
previews fire) instead of the legacy preview stack (where only the top
one
fires).  As a result, widgets on the legacy preview stack may be
promoted
to the top of the stack now that the PopupPanels have been removed, so
one
of the legacy previews may fire.  The fix is to put the PopupPanel on
both
stacks to maintain the order.


Workaround if you have one:
Convert all widgets to use PreviewNativeEvent (all GWT widgets have been
converted).

Associated Issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3285

Please review this at http://gwt-code-reviews.appspot.com/2204

Affected files:
   user/src/com/google/gwt/user/client/ui/PopupPanel.java


Index: user/src/com/google/gwt/user/client/ui/PopupPanel.java
===================================================================
--- user/src/com/google/gwt/user/client/ui/PopupPanel.java      (revision 4445)
+++ user/src/com/google/gwt/user/client/ui/PopupPanel.java      (working copy)
@@ -462,6 +462,7 @@
        nativePreviewHandlerRegistration.removeHandler();
        nativePreviewHandlerRegistration = null;
      }
+    DOM.removeEventPreview(this);

      // Hide the popup
      resizeAnimation.setState(false);
@@ -783,6 +784,7 @@
          previewNativeEvent(event);
        }
      });
+    DOM.addEventPreview(this);
      resizeAnimation.setState(true);
    }

@@ -820,10 +822,6 @@
     */
    @SuppressWarnings("deprecation")
    protected void onPreviewNativeEvent(NativePreviewEvent event) {
-    // Cancel the event based on the deprecated onEventPreview() method
-    if (!event.isCanceled() && !onEventPreview(event.getNativeEvent())) {
-      event.cancel();
-    }
    }

    /**



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to