Opened 13 years ago

Closed 12 years ago

#2271 closed defect (invalid)

Timeing issue with FireFox dojo.browser.undo.addToHistory/dojo.io.bind changeUrl:

Reported by: ialpert@… Owned by: James Burke
Priority: high Milestone: 0.9
Component: IO Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Having a hard time reproducing this one in a test.

In a symptoms are changeUrl is enabled on a dojo.io.bind call i get two things

  1. the browser instead of with changeUrl: "foo,bar,baz" getting somethign like

http://localhost/blah/lastCurrentAddressBar.do#foo,bar,baz i get http://localhost/blah/#foo,bar,baz

  1. the back call on the initial state seems to get triggered.

Attachments (2)

test_browser_bookmark2.html (3.6 KB) - added by guest 13 years ago.
browser.js (11.6 KB) - added by guest 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by guest

Attachment: test_browser_bookmark2.html added

Changed 13 years ago by guest

Attachment: browser.js added

comment:1 Changed 13 years ago by Izaak Alpert

this still doesn't seem to illicit the not using the current address, but with the debug lines in the browser.js there's sufficient time to cause the changeLocation to be called.

comment:2 Changed 13 years ago by James Burke

Milestone: 0.5

I've noticed an issue on tests/io/test_BrowserIO.html where the back handler seems to get triggered. I think the core issue is that test page calls dojo.io.bind() as part of the dojo.addOnLoad() call. I don't think this should be done. I think just dojo.undo.browser.setInitialState() should be called as part of dojo.addOnLoad(), then user actions that trigger bind calls can register with dojo.undo.browser.

Could that be the issue you are encountering? calling a dojo.io.bind() with a back: function parameter as well as calling dojo.undo.browser.setInitialState() inside the page's dojo.addOnLoad() callback?

comment:3 Changed 13 years ago by Izaak Alpert

I think this is exhibited regardless of the presence of a bind call in the addOnLoad(). None of the bind calls i've used implement a back: function (only changeUrl). I think this test works with or without the bind call, however i have to modify the original source (added some dojo.debug calls -- presumably slowing it down) to exhibit this behaviour

comment:4 Changed 12 years ago by Izaak Alpert

Ok this was caused because i was setting the base tag of the document -- sorry

comment:5 Changed 12 years ago by James Burke

Resolution: invalid
Status: newclosed

Thanks for the more information. I'll close the bug now.

Note: See TracTickets for help on using tickets.