Has anyone else noticed weird behavior with Safari 3 and empty history
tokens?  Setting the innerHTML during the invocation of the history listener
for empty tokens does not seem to have any effect.
I think the problem has to do with the immediate history processing.

I put a repro case at: http://web.mit.edu/sgross/www/history/Hello.html

-Sam

========
Here's the source code:

package com.google.gwt.sample.hello.client;


import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.dom.client.Element;

import com.google.gwt.user.client.DOM;

import com.google.gwt.user.client.History;

import com.google.gwt.user.client.HistoryListener;

import com.google.gwt.user.client.ui.Label;

import com.google.gwt.user.client.ui.RootPanel;


/**

 * History test application.

 */

public class Hello implements EntryPoint, HistoryListener {


  Label status;


  private static boolean isBorked() {

    Element e = DOM.createDiv();

    e.setInnerHTML("string");

    return e.getInnerHTML().length() == 0;

  }


  public void onModuleLoad() {

    History.addHistoryListener(this);

    status = new Label("onHistoryChanged has not fired!");

    History.newItem("x");

    History.newItem("");

    RootPanel.get().add(status);

  }


  public void onHistoryChanged(String historyToken) {

    if (historyToken.equals("")) {

      if (isBorked()) {

        status.setText("History totally borked!");

      } else {

        status.setText("History OK");

      }

    }

  }

}

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

Reply via email to