promisefeni / reallysimplehistory

Automatically exported from code.google.com/p/reallysimplehistory
Other
0 stars 0 forks source link

Changing Hash does not fire history event on Safari 3.0.3 for Windows (XP) #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Downloaded an unzipped latest History
2. Opened rshTestPage.html in Safari
3. Typed #test, then enter

What is the expected output? What do you see instead?

I expected:

A history change has occured: | newLocation=test | historyData=null |

Nothing showed up instead.

Original issue reported on code.google.com by JustinBMeyer@gmail.com on 20 Feb 2008 at 6:13

GoogleCodeExporter commented 8 years ago
It works if I change

getCurrentLocation: function() {
  var r = (this.isSafari
    ? this.getSafariState()
    : this.getCurrentHash()
  );
  return r;
}

to

getCurrentLocation: function() {
   return this.getCurrentHash();
}

Obviously, I'm probably breaking other things.  But hopefully this might lead 
to a
solution.

Original comment by JustinBMeyer@gmail.com on 20 Feb 2008 at 6:47

GoogleCodeExporter commented 8 years ago
As far as I can tell, the following should work for all browser:

getCurrentLocation: function() {
    if (this.isSafari)
        return (this.getSafariState()) ? this.getSafariState() : this.getCurrentHash();
    return this.getCurrentHash();
}

Or am breaking something I can't see?

Original comment by myrl...@gmail.com on 2 Apr 2008 at 2:05

GoogleCodeExporter commented 8 years ago
@myrlund : the fixed you provided seems appropriate, it does fix the problem in 
my use case. Thanks

Original comment by olivier....@gmail.com on 8 Sep 2011 at 3:46