Fred & John,
Would you guys mind having a quick look at this miniscule patch? It's very
simple, so I just attached the diff inline.
Background: Fred discovered some pretty odd behavior in his drag & drop
library against 1.6, and we tracked it down to a difference between Safari 3
& 4 (!). It turns out that on Safari 3, Event.currentTarget can actually be
null when it should be returning the Window object. Safari 4 fixes this, and
behaves the same way as Firefox. This patch just causes it to return $wnd
whenever Event.currentTarget resolves to null. This seems to fix Fred's
issue, and to my knowledge explains the behavior perfectly (@Fred, if you
could confirm this, that would be quite helpful).
Thanks,
joel.
Index: user/src/com/google/gwt/dom/client/DOMImplSafari.java
===================================================================
--- user/src/com/google/gwt/dom/client/DOMImplSafari.java (revision 5016)
+++ user/src/com/google/gwt/dom/client/DOMImplSafari.java (working copy)
@@ -48,6 +48,11 @@
}
@Override
+ public native EventTarget eventGetCurrentTarget(NativeEvent event) /*-{
+ return event.currentTarget || $wnd;
+ }-*/;
+
+ @Override
public native int eventGetMouseWheelVelocityY(NativeEvent evt) /*-{
return Math.round(-evt.wheelDelta / 40) || 0;
}-*/;
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---