jquery-address icon indicating copy to clipboard operation
jquery-address copied to clipboard

History not correct in Google Chrome...(Examples)

Open fooger opened this issue 13 years ago • 0 comments

Hello.The history in Google Chrome, not working properly: Example №1:

$.address.strict(false); //disable sctrict
$.address.value("home"); //change hash to "home"
$.address.value("contact"); //change hash to "contact",
$.address.value("map"); //change hash to "map"

history should look so:

  1. site.com
  2. site.com#home
  3. site.com#contact
  4. site.com#map but in last stable Chrome, history is:
  5. site.com#map

In IE9 work properly, in Chrome - no!

Example №2 (work correctly):

function go(){
    $.address.strict(false); //disable sctrict
    $.address.value("home"); //change hash to "home"
    $.address.value("contact"); //change hash to "contact",
    $.address.value("map"); //change hash to "map"
}
setTimeout(go,0);

It works correctly in all browser.

The main problem: If used $.address.history(true) and $.address.history(false), Google Chrome history not working properly: Example №3:

function go(){
    $.address.strict(false); //disable sctrict
    $.address.value("home"); //change hash to "home"
    $.address.history(false); //disable history
    $.address.value("contact"); //change hash to "contact", without the change history
    $.address.history(true); //enable history
    $.address.value("home"); //change hash to "home",  with new history (not work!!)
}
setTimeout(go,0);

history should look so:

  1. site.com
  2. site.com#contact
  3. site.com#home but in last stable Chrome, history is:
  4. site.com
  5. site.com#home

In IE9 work properly, in Chrome - no!

If change the last line in this example to $.address.value("map"); everything is working properly.

Example №3 (work correctly):

function go(){
    $.address.strict(false); //disable sctrict
    $.address.value("home"); //change hash to "home"
    $.address.history(false); //disable history
    $.address.value("contact"); //change hash to "contact", without the change history
    $.address.history(true); //enable history
    $.address.value("map"); //change hash to "map",  with new history (not work!!)
}
setTimeout(go,0);

In all browser history look:

  1. site.com
  2. site.com#contact
  3. site.com#map

I hope you can fix it !!! ))) Sorry for my English, i know his bad, becouse i live in non-English language country))) Thanks

fooger avatar Nov 12 '11 18:11 fooger