arieh / HistoryManager

a mootools history-manager / obeserver class
18 stars 4 forks source link

updateState not called #10

Open woomla opened 12 years ago

woomla commented 12 years ago

Hi,

First of all, nice component!

I've noticed one unexpected behaviour. If you set multiple values in HM in say a click handler only the last one is set. I think this is because in HM.set, this.state is not yet updated between the two calls. It is not updated because in HL.setHash, 'onhashchange' is in window and document.documentNode is undefined (FF 8,9 W7 64 bit)

$('mybutton').addEvent('click', function ()
{
  HM.set('txt1', 'example1');
  HM.set('txt2', 'example2');
});