Maheshjayachandran / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Html5History call callback function twice on browser event. #449

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. historyInstance = new goog.history.Html5History();
2. historyInstance.setEnable(true);
3. historyInstance.setToken('e1'); historyInstance.setToken('e2');
4. when using browser 'back' button two identically looking events happen.

What is the expedite output? What do you see instead?
Just one event or consistency with goog.History (there are two events with 
isNavigation value different).

What version of the product are you using? On what operating system?
Linux, amd64, svn rev. 1732

Please provide any additional information below.
http://stackoverflow.com/questions/7131106/google-closure-html5history-fires-nav
igate-event-twice
Below patch working fine with Opera/Chrome/Firefox. What is the reason of 
listening popstate?

Original issue reported on code.google.com by pawelszc...@gmail.com on 12 Apr 2012 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
thanks. it fixed.

Original comment by kyawt...@gmail.com on 19 Apr 2012 at 3:02

GoogleCodeExporter commented 9 years ago
Patch by Googler. I've asked Pawel to submit internally and the fix will show 
up externally soon.

Original comment by nn...@google.com on 10 May 2012 at 11:11

GoogleCodeExporter commented 9 years ago

Original comment by nn...@google.com on 11 May 2012 at 8:18

GoogleCodeExporter commented 9 years ago
//inline
h = new goog.history.Html5History();

goog.events.unlisten(h.window_, goog.events.EventType.POPSTATE, 
h.onHistoryEvent_, false, h);

goog.events.unlisten(h.window_, goog.events.EventType.HASHCHANGE, 
h.onHistoryEvent_, false, h);

Original comment by ber...@gmail.com on 2 Sep 2013 at 9:27

GoogleCodeExporter commented 9 years ago
What is happening with this? Will this every go into the core libs?

Original comment by guido.tapia@gmail.com on 9 Feb 2014 at 12:19