Tuesday, January 31, 2012

Window.ClosingEvent is not fire in iPad


When I make a change of my window location the Window.ClosingEvent
it's not fire on Safari, iPad2, iOS 5.0.1...

I attach a example source that works in android, firefox, chrome...
but not in Safari... I don't know which is the problem... could anyone
help me¿

Thank you

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootLayoutPanel;

public class Test implements EntryPoint {

public void onModuleLoad() {
Window.addWindowClosingHandler(new Window.ClosingHandler() {
public void onWindowClosing(Window.ClosingEvent closingEvent) {
closingEvent.setMessage("Are you sure?" );
Button b = new Button("Button");
b.addClickHandler(new ClickHandler(){

public void onClick(ClickEvent event) {

public static native void change_location()/*-{

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment